topgun/k8s: run dns proxy tests against containerd
concourse/concourse#5473
@@ -14,21 +14,6 @@ var _ = Describe("DNS Resolution", func() {
setReleaseNameAndNamespace("dp")
})
- var setupDeployment = func(dnsProxyEnable, dnsServer string) {
- args := []string{
- `--set=worker.replicas=1`,
- `--set-string=concourse.worker.garden.dnsProxyEnable=` + dnsProxyEnable,
- }
- if dnsServer != "" {
- args = append(args,
- `--set=worker.env[0].name=CONCOURSE_GARDEN_DNS_SERVER`,
- `--set=worker.env[0].value=`+dnsServer)
- }
-
- deployConcourseChart(releaseName, args...)
- atc = waitAndLogin(namespace, releaseName+"-web")
- }
-
AfterEach(func() {
cleanup(releaseName, namespace)
atc.Close()
@@ -52,9 +37,28 @@ var _ = Describe("DNS Resolution", func() {
shouldWork bool
}
+ var setupDeployment = func(useContainerd bool, dnsProxyEnable, dnsServer string) {
+ args := []string{
+ `--set=worker.replicas=1`,
+ `--set-string=concourse.worker.garden.dnsProxyEnable=` + dnsProxyEnable,
+ }
+ if useContainerd {
+ args = append(args, "--set=worker.garden.useContainerd=true")
+ }
+ if dnsServer != "" {
+ args = append(args,
+ `--set=worker.env[0].name=CONCOURSE_GARDEN_DNS_SERVER`,
+ `--set=worker.env[0].value=`+dnsServer)
+ }
+
+ deployConcourseChart(releaseName, args...)
+ atc = waitAndLogin(namespace, releaseName+"-web")
+ }
+
+ expectedDnsProxyBehaviour := func(useContainerd bool) {
DescribeTable("different proxy settings",
func(c Case) {
- setupDeployment(c.enableDnsProxy, c.dnsServer)
+ setupDeployment(useContainerd, c.enableDnsProxy, c.dnsServer)
sess := fly.Start("execute", "-c", "tasks/dns-proxy-task.yml", "-v", "url="+c.addressFunction())
<-sess.Exited
@@ -99,4 +103,13 @@ var _ = Describe("DNS Resolution", func() {
shouldWork: false,
}),
)
+ }
+
+ Context("with gdn backend", func() {
+ expectedDnsProxyBehaviour(false)
+ })
+
+ Context("with containerd backend", func() {
+ expectedDnsProxyBehaviour(true)
+ })
})
