Skip to content

Commit

Permalink
cleanup kubectl
Browse files Browse the repository at this point in the history
  • Loading branch information
kadel committed Mar 18, 2020
1 parent 8936cce commit b853bff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 62 deletions.
56 changes: 0 additions & 56 deletions tests/helper/helper_kubectl.go

This file was deleted.

10 changes: 4 additions & 6 deletions tests/integration/cmd_devfile_push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ var _ = Describe("odo devfile push command tests", func() {
// TODO: to goal is not to use "oc"
oc = helper.NewOcRunner("oc")

kubectl := helper.NewKubectlRunner("kubectl")

// This is run after every Spec (It)
var _ = BeforeEach(func() {
SetDefaultEventuallyTimeout(10 * time.Minute)
namespace = kubectl.CreateRandNamespace()
namespace = helper.CreateRandProject()
context = helper.CreateNewContext()
currentWorkingDirectory = helper.Getwd()
helper.Chdir(context)
Expand All @@ -38,7 +36,7 @@ var _ = Describe("odo devfile push command tests", func() {
// Clean up after the test
// This is run after every Spec (It)
var _ = AfterEach(func() {
kubectl.DeleteNamespace(namespace)
helper.DeleteProject(namespace)
helper.Chdir(currentWorkingDirectory)
helper.DeleteDir(context)
os.Unsetenv("GLOBALODOCONFIG")
Expand Down Expand Up @@ -104,7 +102,7 @@ var _ = Describe("odo devfile push command tests", func() {
// Check to see if it's been pushed (foobar.txt abd directory testdir)
podName := oc.GetRunningPodNameByComponent(cmpName, namespace)

stdOut := kubectl.ListDir(podName, namespace, sourcePath)
stdOut := oc.ExecListDir(podName, namespace, sourcePath)
Expect(stdOut).To(ContainSubstring(("foobar.txt")))
Expect(stdOut).To(ContainSubstring(("testdir")))

Expand All @@ -114,7 +112,7 @@ var _ = Describe("odo devfile push command tests", func() {
helper.CmdShouldPass("odo", "push", "--devfile", "devfile.yaml", "--namespace", namespace, "-v4")

// Then check to see if it's truly been deleted
stdOut = kubectl.ListDir(podName, namespace, sourcePath)
stdOut = oc.ExecListDir(podName, namespace, sourcePath)
Expect(stdOut).To(Not(ContainSubstring(("foobar.txt"))))
Expect(stdOut).To(Not(ContainSubstring(("testdir"))))
})
Expand Down

0 comments on commit b853bff

Please sign in to comment.