job names: exclude text before `e2e` for both platform and network tests
I put the check in the wrong place when I fixed this in
@@ -20,14 +20,7 @@ import (
var _ = g.Describe("[sig-ci] [Early] prow job name", func() {
defer g.GinkgoRecover()
oc := exutil.NewCLI("job-names")
-
- g.It("should match platform type [apigroup:config.openshift.io]", func() {
jobName := os.Getenv("JOB_NAME")
- if jobName == "" {
- e2eskipper.Skipf("JOB_NAME env var not set, skipping")
- } else if strings.Contains(jobName, "agnostic") {
- e2eskipper.Skipf("JOB_NAME contains agnostic, not expecting platform in name")
- }
// If it's an e2e job, we're only interested in the parts that come after e2e, e.g.
// a presubmit on pull-ci-openshift-ovn-kubernetes-master-e2e-hypershift, we don't want
@@ -38,6 +31,13 @@ var _ = g.Describe("[sig-ci] [Early] prow job name", func() {
jobName = parts[len(parts)-1]
}
+ g.It("should match platform type [apigroup:config.openshift.io]", func() {
+ if jobName == "" {
+ e2eskipper.Skipf("JOB_NAME env var not set, skipping")
+ } else if strings.Contains(jobName, "agnostic") {
+ e2eskipper.Skipf("JOB_NAME contains agnostic, not expecting platform in name")
+ }
+
infra, err := oc.AdminConfigClient().ConfigV1().Infrastructures().Get(context.Background(), "cluster", metav1.GetOptions{})
o.Expect(err).NotTo(o.HaveOccurred())
@@ -65,7 +65,6 @@ var _ = g.Describe("[sig-ci] [Early] prow job name", func() {
})
g.It("should match network type [apigroup:config.openshift.io]", func() {
- jobName := os.Getenv("JOB_NAME")
if jobName == "" {
e2eskipper.Skipf("JOB_NAME env var not set, skipping")
}
