diff --git a/test/e2e-iri/OWNERS b/test/e2e-iri/OWNERS new file mode 100644 index 0000000000..74e8b7eee0 --- /dev/null +++ b/test/e2e-iri/OWNERS @@ -0,0 +1,14 @@ +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: + - andfasano + - bfournie + - pawanpinjarkar + - rwsu + - zaneb +reviewers: + - andfasano + - bfournie + - pawanpinjarkar + - rwsu + - zaneb \ No newline at end of file diff --git a/test/e2e-iri/iri_test.go b/test/e2e-iri/iri_test.go index 8cf38688c6..b9d85570bd 100644 --- a/test/e2e-iri/iri_test.go +++ b/test/e2e-iri/iri_test.go @@ -6,6 +6,7 @@ import ( "crypto/x509" "fmt" "net/http" + "os" "reflect" "testing" "time" @@ -38,6 +39,8 @@ func TestIRIResource_Available(t *testing.T) { } func TestIRIController_VerifyIRIRegistryOnAllTheMasterNodes_NoCert(t *testing.T) { + skipIfOpenShiftCI(t) + masterNodes, err := framework.NewClientSet("").CoreV1Interface.Nodes().List(context.TODO(), v1.ListOptions{LabelSelector: "node-role.kubernetes.io/master="}) require.NoError(t, err) @@ -71,12 +74,30 @@ func skipIfNoBaremetal(t *testing.T) { } } +// Currently some tests are not supported in the OpenShift CI +// environment (due the proxy settings) +func skipIfOpenShiftCI(t *testing.T) { + items := []string{ + // Specific to OpenShift CI. + "OPENSHIFT_CI", + // Common to all CI systems. + "CI", + } + + for _, item := range items { + if _, ok := os.LookupEnv(item); ok { + t.Skip("Skipping OpenShift CI environment") + } + } +} + func TestIRIController_VerifyIRIRegistryOnApiInt_WithCert(t *testing.T) { + skipIfOpenShiftCI(t) + skipIfNoBaremetal(t) + cs := framework.NewClientSet("") ctx := context.Background() - skipIfNoBaremetal(t) - // Retrieve the root CA (same of MCS). cm, err := cs.ConfigMaps("openshift-machine-config-operator").Get(ctx, "machine-config-server-ca", v1.GetOptions{}) require.NoError(t, err)