Skip to content

Instantly share code, notes, and snippets.

@ramr
Created October 3, 2018 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramr/71ee5756971029e99f874ba0e3a584b3 to your computer and use it in GitHub Desktop.
Save ramr/71ee5756971029e99f874ba0e3a584b3 to your computer and use it in GitHub Desktop.
clusterdns op integration test
[ramr@f28 cluster-dns-operator (cached:installer-config:c-1:s-0+10:o-4)]$ KUBECONFIG=/home/ramr/work/redhat/src/github.com/openshift/release/cluster/test-deploy/gcp-dev/admin.kubeconfig make test-integration
go test -v -tags integration ./test/integration
=== RUN TestIntegration
=== RUN TestIntegration/TestDNSRecords
time="2018-10-02T18:15:04-07:00" level=error msg="Getting cluster dns ip: getting cluster-config-v1 resource: configmaps \"cluster-config-v1\" not found"
E1002 18:15:21.631124 11334 reflector.go:322] github.com/openshift/cluster-dns-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer.go:91: Failed to watch *unstructured.Unstructured: the server could not find the requested resource
--- PASS: TestIntegration (25.39s)
integration_test.go:268: Watching dns.openshift.io/v1alpha1, ClusterDNS, default, 600000000000
--- PASS: TestIntegration/TestDNSRecords (16.96s)
integration_test.go:117: configured cluster domain: test-cluster.local, clusterIP: 172.30.182.25:53
PASS
ok github.com/openshift/cluster-dns-operator/test/integration 25.408s
[ramr@f28 cluster-dns-operator (cached:installer-config:c-1:s-0+10:o-4)]$ KUBECONFIG=/home/ramr/work/redhat/src/github.com/openshift/release/cluster/test-deploy/gcp-dev/admin.kubeconfig oc create -f instconfig-test.yaml
configmap/cluster-config-v1 created
[ramr@f28 cluster-dns-operator (cached:installer-config:c-1:s-0+10:o-4)]$ KUBECONFIG=/home/ramr/work/redhat/src/github.com/openshift/release/cluster/test-deploy/gcp-dev/admin.kubeconfig oc get configmaps -n kube-system cluster-config-v1 -o yaml | grep serviceCIDR
serviceCIDR: 172.30.0.0/16
[ramr@f28 cluster-dns-operator (cached:installer-config:c-1:s-0+10:o-4)]$ KUBECONFIG=/home/ramr/work/redhat/src/github.com/openshift/release/cluster/test-deploy/gcp-dev/admin.kubeconfig make test-integration
go test -v -tags integration ./test/integration
=== RUN TestIntegration
=== RUN TestIntegration/TestDNSRecords
time="2018-10-02T18:15:04-07:00" level=error msg="Getting cluster dns ip: getting cluster-config-v1 resource: configmaps \"cluster-config-v1\" not found"
E1002 18:15:21.631124 11334 reflector.go:322] github.com/openshift/cluster-dns-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer.go:91: Failed to watch *unstructured.Unstructured: the server could not find the requested resource
--- PASS: TestIntegration (25.39s)
integration_test.go:268: Watching dns.openshift.io/v1alpha1, ClusterDNS, default, 600000000000
--- PASS: TestIntegration/TestDNSRecords (16.96s)
integration_test.go:117: configured cluster domain: test-cluster.local, clusterIP: 172.30.182.25:53
PASS
ok github.com/openshift/cluster-dns-operator/test/integration (cached)
[ramr@f28 cluster-dns-operator (cached:installer-config:c-1:s-0+10:o-4)]$ KUBECONFIG=/home/ramr/work/redhat/src/github.com/openshift/release/cluster/test-deploy/gcp-dev/admin.kubeconfig make test-integration
go test -v -tags integration ./test/integration
=== RUN TestIntegration
=== RUN TestIntegration/TestDNSRecords
time="2018-10-02T18:15:04-07:00" level=error msg="Getting cluster dns ip: getting cluster-config-v1 resource: configmaps \"cluster-config-v1\" not found"
E1002 18:15:21.631124 11334 reflector.go:322] github.com/openshift/cluster-dns-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer.go:91: Failed to watch *unstructured.Unstructured: the server could not find the requested resource
--- PASS: TestIntegration (25.39s)
integration_test.go:268: Watching dns.openshift.io/v1alpha1, ClusterDNS, default, 600000000000
--- PASS: TestIntegration/TestDNSRecords (16.96s)
integration_test.go:117: configured cluster domain: test-cluster.local, clusterIP: 172.30.182.25:53
PASS
ok github.com/openshift/cluster-dns-operator/test/integration (cached)
[ramr@f28 cluster-dns-operator (cached:installer-config:c-1:s-0+10:o-4)]$ KUBECONFIG=/home/ramr/work/redhat/src/github.com/openshift/release/cluster/test-deploy/gcp-dev/admin.kubeconfig make test-integration
go test -v -tags integration ./test/integration
=== RUN TestIntegration
=== RUN TestIntegration/TestDNSRecords
time="2018-10-02T18:17:21-07:00" level=info msg="Using default cluster dns ip address 172.30.0.10"
--- PASS: TestIntegration (25.11s)
integration_test.go:269: Watching dns.openshift.io/v1alpha1, ClusterDNS, default, 600000000000
--- PASS: TestIntegration/TestDNSRecords (17.20s)
integration_test.go:69: ramr: clusterdns = &{TypeMeta:{Kind:ClusterDNS APIVersion:dns.openshift.io/v1alpha1} ObjectMeta:{Name:test-default GenerateName: Namespace:default SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[] Initializers:nil Finalizers:[] ClusterName:} Spec:{ClusterIP:<nil> ClusterDomain:0xc4203a2f60} Status:{}}
integration_test.go:118: configured cluster domain: test-cluster.local, clusterIP: 172.30.0.10:53
PASS
ok github.com/openshift/cluster-dns-operator/test/integration 25.128s
[ramr@f28 cluster-dns-operator (cached:installer-config:c-1:s-0+10:o-4)]$ git diff test/integration/integration_test.go
diff --git a/test/integration/integration_test.go b/test/integration/integration_test.go
index 101fdab..385c694 100644
--- a/test/integration/integration_test.go
+++ b/test/integration/integration_test.go
@@ -66,6 +66,7 @@ func testDNSRecords(t *testing.T) {
t.Fatal(err)
}
clusterDNS.Namespace = testConfig.operatorNamespace
+ t.Logf("ramr: clusterdns = %+v", clusterDNS)
dnsService, err := f.DNSService(clusterDNS)
if err != nil {
[ramr@f28 cluster-dns-operator (cached:installer-config:c-1:s-0+10:o-4)]$ KUBECONFIG=/home/ramr/work/redhat/src/github.com/openshift/release/cluster/test-deploy/gcp-dev/admin.kubeconfig make test-integration
go test -v -tags integration ./test/integration
=== RUN TestIntegration
=== RUN TestIntegration/TestDNSRecords
time="2018-10-02T18:17:21-07:00" level=info msg="Using default cluster dns ip address 172.30.0.10"
--- PASS: TestIntegration (25.11s)
integration_test.go:269: Watching dns.openshift.io/v1alpha1, ClusterDNS, default, 600000000000
--- PASS: TestIntegration/TestDNSRecords (17.20s)
integration_test.go:69: ramr: clusterdns = &{TypeMeta:{Kind:ClusterDNS APIVersion:dns.openshift.io/v1alpha1} ObjectMeta:{Name:test-default GenerateName: Namespace:default SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[] Initializers:nil Finalizers:[] ClusterName:} Spec:{ClusterIP:<nil> ClusterDomain:0xc4203a2f60} Status:{}}
integration_test.go:118: configured cluster domain: test-cluster.local, clusterIP: 172.30.0.10:53
PASS
ok github.com/openshift/cluster-dns-operator/test/integration (cached)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment