Skip to content

Commit

Permalink
e2e:must-gather: Check MCP Test only in K8s
Browse files Browse the repository at this point in the history
When running in k8s test suite setup will create a MCP-test element but
in OCP it will not, so we restrict the search for proper mcp-test pod
folder to k8s platform
  • Loading branch information
jlojosnegros committed Aug 16, 2022
1 parent 2c049ea commit 91d16bd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/e2e/must-gather/must_gather_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ import (
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/yaml"

"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"github.com/k8stopologyawareschedwg/deployer/pkg/deployer/platform"
e2eclient "github.com/openshift-kni/numaresources-operator/test/utils/clients"
"github.com/openshift-kni/numaresources-operator/test/utils/configuration"
"github.com/openshift-kni/numaresources-operator/test/utils/objects/wait"

"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
)

var _ = ginkgo.Describe("[must-gather] NRO data collected", func() {
Expand Down Expand Up @@ -133,8 +136,11 @@ var _ = ginkgo.Describe("[must-gather] NRO data collected", func() {
podFolderNames = append(podFolderNames, podFolder.Name())
}
gomega.Expect(podFolderNames).To(gomega.ContainElement(gomega.MatchRegexp("^numaresources-controller-manager*")))
gomega.Expect(podFolderNames).To(gomega.ContainElement(gomega.MatchRegexp("^numaresourcesoperator-mcp-test*")))
gomega.Expect(podFolderNames).To(gomega.ContainElement(gomega.MatchRegexp("^secondary-scheduler*")))

if configuration.Plat == platform.Kubernetes {
gomega.Expect(podFolderNames).To(gomega.ContainElement(gomega.MatchRegexp("^numaresourcesoperator-mcp-test*")))
}
}
})
})
Expand Down

0 comments on commit 91d16bd

Please sign in to comment.