Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test/e2e-iri/OWNERS
Original file line number Diff line number Diff line change
@@ -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
25 changes: 23 additions & 2 deletions test/e2e-iri/iri_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"crypto/x509"
"fmt"
"net/http"
"os"
"reflect"
"testing"
"time"
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down