From 282b303e83e37c8e1cc6472824c8ff40bda21bd6 Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Mon, 13 Dec 2021 15:35:22 +0100 Subject: [PATCH 1/2] nixos/kubernetes: drop tty and stdin for execs in test pods --- nixos/tests/kubernetes/dns.nix | 4 ++-- nixos/tests/kubernetes/rbac.nix | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nixos/tests/kubernetes/dns.nix b/nixos/tests/kubernetes/dns.nix index b6cd811c5aef..79e35bfec5a4 100644 --- a/nixos/tests/kubernetes/dns.nix +++ b/nixos/tests/kubernetes/dns.nix @@ -100,7 +100,7 @@ let machine1.succeed("host redis.default.svc.cluster.local") # check dns inside the container - machine1.succeed("kubectl exec -ti probe -- /bin/host redis.default.svc.cluster.local") + machine1.succeed("kubectl exec probe -- /bin/host redis.default.svc.cluster.local") ''; }; @@ -142,7 +142,7 @@ let machine2.succeed("host redis.default.svc.cluster.local") # check dns inside the container - machine1.succeed("kubectl exec -ti probe -- /bin/host redis.default.svc.cluster.local") + machine1.succeed("kubectl exec probe -- /bin/host redis.default.svc.cluster.local") ''; }; in { diff --git a/nixos/tests/kubernetes/rbac.nix b/nixos/tests/kubernetes/rbac.nix index 3fc8ed0fbe38..99194a69c261 100644 --- a/nixos/tests/kubernetes/rbac.nix +++ b/nixos/tests/kubernetes/rbac.nix @@ -115,9 +115,9 @@ let machine1.wait_until_succeeds("kubectl get pod kubectl | grep Running") - machine1.wait_until_succeeds("kubectl exec -ti kubectl -- kubectl get pods") - machine1.fail("kubectl exec -ti kubectl -- kubectl create -f /kubectl-pod-2.json") - machine1.fail("kubectl exec -ti kubectl -- kubectl delete pods -l name=kubectl") + machine1.wait_until_succeeds("kubectl exec kubectl -- kubectl get pods") + machine1.fail("kubectl exec kubectl -- kubectl create -f /kubectl-pod-2.json") + machine1.fail("kubectl exec kubectl -- kubectl delete pods -l name=kubectl") ''; }; @@ -152,9 +152,9 @@ let machine1.wait_until_succeeds("kubectl get pod kubectl | grep Running") - machine1.wait_until_succeeds("kubectl exec -ti kubectl -- kubectl get pods") - machine1.fail("kubectl exec -ti kubectl -- kubectl create -f /kubectl-pod-2.json") - machine1.fail("kubectl exec -ti kubectl -- kubectl delete pods -l name=kubectl") + machine1.wait_until_succeeds("kubectl exec kubectl -- kubectl get pods") + machine1.fail("kubectl exec kubectl -- kubectl create -f /kubectl-pod-2.json") + machine1.fail("kubectl exec kubectl -- kubectl delete pods -l name=kubectl") ''; }; From d90103d1121cfa69df786fd17e7f8c06aff0da3d Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 14 Dec 2021 11:02:36 +1000 Subject: [PATCH 2/2] Revert "kubernetes: disable rbac tests" This reverts commit 91c6a97243711446471fc8a576cb9d21f516641f. --- nixos/tests/kubernetes/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nixos/tests/kubernetes/default.nix b/nixos/tests/kubernetes/default.nix index 97931234fcc7..90b73c68a76d 100644 --- a/nixos/tests/kubernetes/default.nix +++ b/nixos/tests/kubernetes/default.nix @@ -10,8 +10,6 @@ in { dns-single-node = dns.singlenode.test; dns-multi-node = dns.multinode.test; - # timed out: https://hydra.nixos.org/build/160710933 - #rbac-single-node = rbac.singlenode.test; - # timed out: https://hydra.nixos.org/build/160711286 - #rbac-multi-node = rbac.multinode.test; + rbac-single-node = rbac.singlenode.test; + rbac-multi-node = rbac.multinode.test; }