Skip to content

Commit 67f6c37

Browse files
bpareessoltysh
authored andcommitted
Adapt to v2 by migrating use of extensions/table package
1 parent 1bc22fc commit 67f6c37

File tree

3 files changed

+22
-25
lines changed

3 files changed

+22
-25
lines changed

test/extended/networking/tuning.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"time"
88

99
g "github.com/onsi/ginkgo/v2"
10-
t "github.com/onsi/ginkgo/v2/extensions/table"
1110
o "github.com/onsi/gomega"
1211

1312
kapiv1 "k8s.io/api/core/v1"
@@ -79,7 +78,7 @@ var _ = g.Describe("[sig-network][Feature:tuning]", func() {
7978
o.Expect(result).To(o.Equal(sysctl.Value), "incorrect sysctl value")
8079
}
8180
})
82-
t.DescribeTable("pod should not start for sysctls not on whitelist", func(sysctl, value string) {
81+
g.DescribeTable("pod should not start for sysctls not on whitelist", func(sysctl, value string) {
8382
namespace := f.Namespace.Name
8483
tuningNADName := "tuningnadwithdisallowedsysctls"
8584
err := createTuningNAD(oc.AdminConfig(), namespace, tuningNADName, map[string]string{sysctl: value})
@@ -101,8 +100,8 @@ var _ = g.Describe("[sig-network][Feature:tuning]", func() {
101100
return pod.Status.Phase
102101
}, 15*time.Second, 3*time.Second).Should(o.Equal(kapiv1.PodPending))
103102
},
104-
t.Entry("net.ipv4.conf.all.send_redirects", "net.ipv4.conf.all.send_redirects", "1"),
105-
t.Entry("net.ipv4.conf.IFNAME.arp_filter", "net.ipv4.conf.IFNAME.arp_filter", "1"),
103+
g.Entry("net.ipv4.conf.all.send_redirects", "net.ipv4.conf.all.send_redirects", "1"),
104+
g.Entry("net.ipv4.conf.IFNAME.arp_filter", "net.ipv4.conf.IFNAME.arp_filter", "1"),
106105
)
107106

108107
g.It("pod sysctls should not affect node", func() {

test/extended/oauth/server_headers.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"net/url"
77

88
g "github.com/onsi/ginkgo/v2"
9-
t "github.com/onsi/ginkgo/v2/extensions/table"
109
o "github.com/onsi/gomega"
1110

1211
"k8s.io/client-go/rest"
@@ -40,7 +39,7 @@ var _ = g.Describe("[sig-auth][Feature:OAuthServer] [Headers][apigroup:route.ope
4039
oauthServerCleanup()
4140
})
4241

43-
t.DescribeTable("expected headers returned from the",
42+
g.DescribeTable("expected headers returned from the",
4443
func(path string) {
4544
checkUrl, err := url.Parse(oauthServerAddr)
4645
o.Expect(err).ToNot(o.HaveOccurred())
@@ -93,14 +92,14 @@ var _ = g.Describe("[sig-auth][Feature:OAuthServer] [Headers][apigroup:route.ope
9392

9493
o.Expect(resp.Header).To(o.Equal(allHeaders))
9594
},
96-
t.Entry("root URL", "/"),
97-
t.Entry("login URL for when there is only one IDP", "/login"),
98-
t.Entry("login URL for the bootstrap IDP", "/login/kube:admin"),
99-
t.Entry("login URL for the allow all IDP", "/login/anypassword"),
100-
t.Entry("logout URL", "/logout"),
101-
t.Entry("token URL", "/oauth/token"),
102-
t.Entry("authorize URL", "/oauth/authorize"),
103-
t.Entry("grant URL", "/oauth/authorize/approve"),
104-
t.Entry("token request URL", "/oauth/token/request"),
95+
g.Entry("root URL", "/"),
96+
g.Entry("login URL for when there is only one IDP", "/login"),
97+
g.Entry("login URL for the bootstrap IDP", "/login/kube:admin"),
98+
g.Entry("login URL for the allow all IDP", "/login/anypassword"),
99+
g.Entry("logout URL", "/logout"),
100+
g.Entry("token URL", "/oauth/token"),
101+
g.Entry("authorize URL", "/oauth/authorize"),
102+
g.Entry("grant URL", "/oauth/authorize/approve"),
103+
g.Entry("token request URL", "/oauth/token/request"),
105104
)
106105
})

test/extended/security/sysctl.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"time"
66

77
g "github.com/onsi/ginkgo/v2"
8-
t "github.com/onsi/ginkgo/v2/extensions/table"
98
o "github.com/onsi/gomega"
109

1110
v1 "k8s.io/api/core/v1"
@@ -19,7 +18,7 @@ import (
1918

2019
var _ = g.Describe("[sig-arch] [Conformance] sysctl", func() {
2120
oc := exutil.NewCLIWithPodSecurityLevel("sysctl", admissionapi.LevelPrivileged)
22-
t.DescribeTable("whitelists", func(sysctl, value, path, defaultSysctlValue string) {
21+
g.DescribeTable("whitelists", func(sysctl, value, path, defaultSysctlValue string) {
2322
f := oc.KubeFramework()
2423
var preexistingPod *v1.Pod
2524
var err error
@@ -75,14 +74,14 @@ var _ = g.Describe("[sig-arch] [Conformance] sysctl", func() {
7574
o.Expect(podOutput).Should(o.Equal(defaultSysctlValue))
7675
})
7776
},
78-
t.Entry("kernel.shm_rmid_forced", "kernel.shm_rmid_forced", "1", "/proc/sys/kernel/shm_rmid_forced", "0"),
79-
t.Entry("net.ipv4.ip_local_port_range", "net.ipv4.ip_local_port_range", "32769\t61001", "/proc/sys/net/ipv4/ip_local_port_range", "32768\t60999"),
80-
t.Entry("net.ipv4.tcp_syncookies", "net.ipv4.tcp_syncookies", "0", "/proc/sys/net/ipv4/tcp_syncookies", "1"),
81-
t.Entry("net.ipv4.ping_group_range", "net.ipv4.ping_group_range", "1\t0", "/proc/sys/net/ipv4/ping_group_range", "0\t2147483647"),
82-
t.Entry("net.ipv4.ip_unprivileged_port_start", "net.ipv4.ip_unprivileged_port_start", "1002", "/proc/sys/net/ipv4/ip_unprivileged_port_start", "1024"),
77+
g.Entry("kernel.shm_rmid_forced", "kernel.shm_rmid_forced", "1", "/proc/sys/kernel/shm_rmid_forced", "0"),
78+
g.Entry("net.ipv4.ip_local_port_range", "net.ipv4.ip_local_port_range", "32769\t61001", "/proc/sys/net/ipv4/ip_local_port_range", "32768\t60999"),
79+
g.Entry("net.ipv4.tcp_syncookies", "net.ipv4.tcp_syncookies", "0", "/proc/sys/net/ipv4/tcp_syncookies", "1"),
80+
g.Entry("net.ipv4.ping_group_range", "net.ipv4.ping_group_range", "1\t0", "/proc/sys/net/ipv4/ping_group_range", "0\t2147483647"),
81+
g.Entry("net.ipv4.ip_unprivileged_port_start", "net.ipv4.ip_unprivileged_port_start", "1002", "/proc/sys/net/ipv4/ip_unprivileged_port_start", "1024"),
8382
)
8483

85-
t.DescribeTable("pod should not start for sysctl not on whitelist", func(sysctl, value string) {
84+
g.DescribeTable("pod should not start for sysctl not on whitelist", func(sysctl, value string) {
8685
f := oc.KubeFramework()
8786
podDefinition := frameworkpod.NewAgnhostPod(f.Namespace.Name, "sysctl-pod", nil, nil, nil)
8887
podDefinition.Spec.SecurityContext.Sysctls = []v1.Sysctl{{Name: sysctl, Value: value}}
@@ -97,7 +96,7 @@ var _ = g.Describe("[sig-arch] [Conformance] sysctl", func() {
9796
})
9897
o.Expect(err).NotTo(o.HaveOccurred(), "should not be able to create pod")
9998
},
100-
t.Entry("kernel.msgmax", "kernel.msgmax", "1000"),
101-
t.Entry("net.ipv4.ip_dynaddr", "net.ipv4.ip_dynaddr", "1"),
99+
g.Entry("kernel.msgmax", "kernel.msgmax", "1000"),
100+
g.Entry("net.ipv4.ip_dynaddr", "net.ipv4.ip_dynaddr", "1"),
102101
)
103102
})

0 commit comments

Comments
 (0)