Skip to content

Commit 1c4fe6c

Browse files
committed
Revert "test kubectl exec"
This reverts commit b107340.
1 parent b107340 commit 1c4fe6c

File tree

2 files changed

+0
-48
lines changed

2 files changed

+0
-48
lines changed

tests/functional-test/cluster_orch_functional_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -181,28 +181,17 @@ var _ = Describe("Cluster Orch Functional tests", Ordered, Label(clusterOrchFunc
181181
cmd := exec.Command("clusterctl", "get", "kubeconfig", clusterName, "--namespace", defaultNamespace) // ">", "kubeconfig.yaml")
182182
output, err := cmd.Output()
183183
Expect(err).NotTo(HaveOccurred())
184-
185184
kubeConfigName := "kubeconfig.yaml"
186185
err = os.WriteFile(kubeConfigName, output, 0644)
187186
Expect(err).NotTo(HaveOccurred())
188-
189187
By("Setting in kubeconfig server to cluster connect gateway")
190188
cmd = exec.Command("sed", "-i", "s|http://[[:alnum:].-]*:8080/|http://127.0.0.1:8081/|", "kubeconfig.yaml")
191189
_, err = cmd.Output()
192190
Expect(err).NotTo(HaveOccurred())
193-
194191
By("Getting list of pods")
195192
cmd = exec.Command("kubectl", "--kubeconfig", "kubeconfig.yaml", "get", "pods")
196193
_, err = cmd.Output()
197194
Expect(err).NotTo(HaveOccurred())
198-
199-
// Exec into one of the pods in the kube-system namespace on the edge node cluster
200-
By("Executing command in kube-scheduler-cluster-agent-0 pod")
201-
cmd = exec.Command("kubectl", "exec", "-it", "-n", "kube-system", "kube-scheduler-cluster-agent-0", "--", "ls")
202-
output, err = cmd.Output()
203-
Expect(err).NotTo(HaveOccurred())
204-
By("Printing the output of the command")
205-
fmt.Printf("Output of `ls` command:\n%s\n", string(output))
206195
})
207196
It("TC-CO-INT-009: Should verify that a cluster template cannot be deleted if there is a cluster using it", func() {
208197
By("Trying to delete the cluster template")

tests/smoke-test/cluster_orch_smoke_test.go

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -162,43 +162,6 @@ var _ = Describe("TC-CO-INT-001: Single Node RKE2 Cluster Create and Delete usin
162162
// Calculate and print the total time taken
163163
totalTime := clusterCreateEndTime.Sub(clusterCreateStartTime)
164164
fmt.Printf("\033[32mTotal time from cluster creation to fully active: %v 🚀 ✅\033[0m\n", totalTime)
165-
166-
// cmd := exec.Command("curl", "-X", "GET", fmt.Sprintf("127.0.0.1:%v/kubernetes/%v-%v/api/v1/namespaces/default/pods", portForwardGatewayLocalPort, namespace, clusterName))
167-
By("Getting kubeconfig")
168-
fmt.Println(clusterName)
169-
cmd := exec.Command("clusterctl", "get", "kubeconfig", clusterName, "--namespace", defaultNamespace) // ">", "kubeconfig.yaml")
170-
output, err := cmd.Output()
171-
Expect(err).NotTo(HaveOccurred())
172-
173-
kubeConfigName := "kubeconfig.yaml"
174-
err = os.WriteFile(kubeConfigName, output, 0644)
175-
Expect(err).NotTo(HaveOccurred())
176-
177-
By("Setting in kubeconfig server to cluster connect gateway")
178-
cmd = exec.Command("sed", "-i", "s|http://[[:alnum:].-]*:8080/|http://127.0.0.1:8081/|", "kubeconfig.yaml")
179-
_, err = cmd.Output()
180-
Expect(err).NotTo(HaveOccurred())
181-
182-
By("Getting list of pods")
183-
cmd = exec.Command("kubectl", "--kubeconfig", "kubeconfig.yaml", "get", "pods")
184-
_, err = cmd.Output()
185-
Expect(err).NotTo(HaveOccurred())
186-
187-
// Dump kubectl client and server version
188-
By("Dumping kubectl client and server version")
189-
cmd = exec.Command("kubectl", "version", "--kubeconfig", "kubeconfig.yaml")
190-
output, err = cmd.Output()
191-
Expect(err).NotTo(HaveOccurred())
192-
By("Printing the output of the command")
193-
fmt.Printf("kubectl client and server version:\n%s\n", string(output))
194-
195-
// Exec into one of the pods in the kube-system namespace on the edge node cluster
196-
By("Executing command in kube-scheduler-cluster-agent-0 pod")
197-
cmd = exec.Command("kubectl", "exec", "--kubeconfig", "kubeconfig.yaml", "-it", "-n", "kube-system", "kube-scheduler-cluster-agent-0", "--", "ls")
198-
output, err = cmd.Output()
199-
Expect(err).NotTo(HaveOccurred())
200-
By("Printing the output of the command")
201-
fmt.Printf("Output of `ls` command:\n%s\n", string(output))
202165
})
203166

204167
JustAfterEach(func() {

0 commit comments

Comments
 (0)