From 17beeaf47a6653d0765fc75b2b88f9d3849343ef Mon Sep 17 00:00:00 2001 From: Swetha Repakula Date: Fri, 5 Mar 2021 18:46:51 -0800 Subject: [PATCH] Promote EndpointSlice E2E Tests to Conformance --- test/conformance/testdata/conformance.yaml | 40 ++++++++++++++++++++++ test/e2e/network/endpointslice.go | 30 ++++++++++++++-- test/e2e/network/endpointslicemirroring.go | 10 +++++- 3 files changed, 76 insertions(+), 4 deletions(-) diff --git a/test/conformance/testdata/conformance.yaml b/test/conformance/testdata/conformance.yaml index 4942a9b9c23..87a56e4efef 100755 --- a/test/conformance/testdata/conformance.yaml +++ b/test/conformance/testdata/conformance.yaml @@ -1150,6 +1150,46 @@ DNS configuration MUST be configured in the Pod. release: v1.17 file: test/e2e/network/dns.go +- testname: EndpointSlice API + codename: '[sig-network] EndpointSlice should create Endpoints and EndpointSlices + for Pods matching a Service [Conformance]' + description: The discovery.k8s.io API group MUST exist in the /apis discovery document. + The discovery.k8s.io/v1 API group/version MUST exist in the /apis/discovery.k8s.io + discovery document. The endpointslices resource MUST exist in the /apis/discovery.k8s.io/v1 + discovery document. The endpointslice controller must create EndpointSlices for + Pods mataching a Service. + release: v1.21 + file: test/e2e/network/endpointslice.go +- testname: EndpointSlice API + codename: '[sig-network] EndpointSlice should create and delete Endpoints and EndpointSlices + for a Service with a selector specified [Conformance]' + description: The discovery.k8s.io API group MUST exist in the /apis discovery document. + The discovery.k8s.io/v1 API group/version MUST exist in the /apis/discovery.k8s.io + discovery document. The endpointslices resource MUST exist in the /apis/discovery.k8s.io/v1 + discovery document. The endpointslice controller should create and delete EndpointSlices + for Pods matching a Service. + release: v1.21 + file: test/e2e/network/endpointslice.go +- testname: EndpointSlice API + codename: '[sig-network] EndpointSlice should have Endpoints and EndpointSlices + pointing to API Server [Conformance]' + description: The discovery.k8s.io API group MUST exist in the /apis discovery document. + The discovery.k8s.io/v1 API group/version MUST exist in the /apis/discovery.k8s.io + discovery document. The endpointslices resource MUST exist in the /apis/discovery.k8s.io/v1 + discovery document. API Server should create self referential Endpoints and EndpointSlices + named "kubernetes" in the default namespace. + release: v1.21 + file: test/e2e/network/endpointslice.go +- testname: EndpointSlice Mirroring + codename: '[sig-network] EndpointSliceMirroring should mirror a custom Endpoints + resource through create update and delete [Conformance]' + description: The discovery.k8s.io API group MUST exist in the /apis discovery document. + The discovery.k8s.io/v1 API group/version MUST exist in the /apis/discovery.k8s.io + discovery document. The endpointslices resource MUST exist in the /apis/discovery.k8s.io/v1 + discovery document. The endpointslices mirrorowing must mirror endpoint create, + update, and delete actions. + release: v1.21 + file: test/e2e/network/endpointslicemirroring.go - testname: Scheduling, HostPort matching and HostIP and Protocol not-matching codename: '[sig-network] HostPort validates that there is no conflict between pods with same hostPort but different hostIP and protocol [LinuxOnly] [Conformance]' diff --git a/test/e2e/network/endpointslice.go b/test/e2e/network/endpointslice.go index 745b82999c2..4c141f8d4b5 100644 --- a/test/e2e/network/endpointslice.go +++ b/test/e2e/network/endpointslice.go @@ -48,7 +48,15 @@ var _ = common.SIGDescribe("EndpointSlice", func() { podClient = f.PodClient() }) - ginkgo.It("should have Endpoints and EndpointSlices pointing to API Server", func() { + /* + Release: v1.21 + Testname: EndpointSlice API + Description: The discovery.k8s.io API group MUST exist in the /apis discovery document. + The discovery.k8s.io/v1 API group/version MUST exist in the /apis/discovery.k8s.io discovery document. + The endpointslices resource MUST exist in the /apis/discovery.k8s.io/v1 discovery document. + API Server should create self referential Endpoints and EndpointSlices named "kubernetes" in the default namespace. + */ + framework.ConformanceIt("should have Endpoints and EndpointSlices pointing to API Server", func() { namespace := "default" name := "kubernetes" endpoints, err := cs.CoreV1().Endpoints(namespace).Get(context.TODO(), name, metav1.GetOptions{}) @@ -70,7 +78,15 @@ var _ = common.SIGDescribe("EndpointSlice", func() { }) - ginkgo.It("should create and delete Endpoints and EndpointSlices for a Service with a selector specified", func() { + /* + Release: v1.21 + Testname: EndpointSlice API + Description: The discovery.k8s.io API group MUST exist in the /apis discovery document. + The discovery.k8s.io/v1 API group/version MUST exist in the /apis/discovery.k8s.io discovery document. + The endpointslices resource MUST exist in the /apis/discovery.k8s.io/v1 discovery document. + The endpointslice controller should create and delete EndpointSlices for Pods matching a Service. + */ + framework.ConformanceIt("should create and delete Endpoints and EndpointSlices for a Service with a selector specified", func() { svc := createServiceReportErr(cs, f.Namespace.Name, &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "example-empty-selector", @@ -165,7 +181,15 @@ var _ = common.SIGDescribe("EndpointSlice", func() { } }) - ginkgo.It("should create Endpoints and EndpointSlices for Pods matching a Service", func() { + /* + Release: v1.21 + Testname: EndpointSlice API + Description: The discovery.k8s.io API group MUST exist in the /apis discovery document. + The discovery.k8s.io/v1 API group/version MUST exist in the /apis/discovery.k8s.io discovery document. + The endpointslices resource MUST exist in the /apis/discovery.k8s.io/v1 discovery document. + The endpointslice controller must create EndpointSlices for Pods mataching a Service. + */ + framework.ConformanceIt("should create Endpoints and EndpointSlices for Pods matching a Service", func() { labelPod1 := "pod1" labelPod2 := "pod2" labelPod3 := "pod3" diff --git a/test/e2e/network/endpointslicemirroring.go b/test/e2e/network/endpointslicemirroring.go index 93385b746c5..0c56f538ad2 100644 --- a/test/e2e/network/endpointslicemirroring.go +++ b/test/e2e/network/endpointslicemirroring.go @@ -40,7 +40,15 @@ var _ = common.SIGDescribe("EndpointSliceMirroring", func() { cs = f.ClientSet }) - ginkgo.It("should mirror a custom Endpoints resource through create update and delete", func() { + /* + Release: v1.21 + Testname: EndpointSlice Mirroring + Description: The discovery.k8s.io API group MUST exist in the /apis discovery document. + The discovery.k8s.io/v1 API group/version MUST exist in the /apis/discovery.k8s.io discovery document. + The endpointslices resource MUST exist in the /apis/discovery.k8s.io/v1 discovery document. + The endpointslices mirrorowing must mirror endpoint create, update, and delete actions. + */ + framework.ConformanceIt("should mirror a custom Endpoints resource through create update and delete", func() { svc := createServiceReportErr(cs, f.Namespace.Name, &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "example-custom-endpoints",