Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Takeshi Yoshimura <tyos@jp.ibm.com>
  • Loading branch information
takeshi-yoshimura committed Nov 22, 2023
1 parent a75f112 commit ed1b804
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_push_controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and push images
on:
push:
branches:
- master
- main
paths:
- api/**
- cmd/**
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unittest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
name: operator-code-coverage-report
path: operator-cover.html
device-plugin-test:
runs-on: ubuntu-latest
Expand All @@ -52,5 +52,5 @@ jobs:
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
name: device-plugin-code-coverage-report
path: dp-cover.html
6 changes: 4 additions & 2 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

efav1alpha1 "github.com/foundation-model-stack/ocp-efa-operator/api/v1alpha1"
kmmv1beta1 "github.com/kubernetes-sigs/kernel-module-management/api/v1beta1"
securityv1 "github.com/openshift/api/security/v1"
nfdv1alpha1 "github.com/openshift/node-feature-discovery/pkg/apis/nfd/v1alpha1"
efav1alpha1 "github.com/foundation-model-stack/ocp-efa-operator/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
//+kubebuilder:scaffold:imports
)
Expand All @@ -43,7 +43,9 @@ const kmmNamespace = "openshift-kmm"
const clusterName = "test"

func TestAPIs(t *testing.T) {
os.Setenv("KUBEBUILDER_ASSETS", "/data/go/src/github.com/foundation-model-stack/ocp-efa-operator/bin/k8s/1.26.0-linux-amd64")
if os.Getenv("KUBEBUILDER_ASSETS") == "" {
os.Setenv("KUBEBUILDER_ASSETS", filepath.Join(build.Default.GOPATH, "src", "github.com", "foundation-model-stack", "ocp-efa-operator", "bin", "k8s", "1.26.0-linux-amd64"))
}
RegisterFailHandler(Fail)

RunSpecs(t, "Controller Suite")
Expand Down

0 comments on commit ed1b804

Please sign in to comment.