Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devfile watch Interation test on kubernetes cluster using travis CI #2916

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
# Run devfile integration test on Kubernetes cluster
- <<: *base-test
stage: test
name: "devfile catalog command integration tests on kubernetes cluster"
name: "devfile catalog, watch command integration tests on kubernetes cluster"
before_script:
# Download kubectl, a cli tool for accessing Kubernetes cluster
- curl -sLo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.7.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
Expand All @@ -174,3 +174,4 @@ jobs:
- sudo cp odo /usr/bin
- export KUBERNETES=true
- travis_wait make test-cmd-devfile-catalog
- travis_wait make test-cmd-devfile-watch
14 changes: 11 additions & 3 deletions tests/integration/devfile/cmd_devfile_watch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,25 @@ var _ = Describe("odo devfile watch command tests", func() {
// This is run after every Spec (It)
var _ = BeforeEach(func() {
SetDefaultEventuallyTimeout(10 * time.Minute)
namespace = helper.CreateRandProject()
context = helper.CreateNewContext()
os.Setenv("GLOBALODOCONFIG", filepath.Join(context, "config.yaml"))
if os.Getenv("KUBERNETES") == "true" {
namespace = helper.CreateRandNamespace(context)
} else {
namespace = helper.CreateRandProject()
}
currentWorkingDirectory = helper.Getwd()
helper.Chdir(context)
os.Setenv("GLOBALODOCONFIG", filepath.Join(context, "config.yaml"))
})

// Clean up after the test
// This is run after every Spec (It)
var _ = AfterEach(func() {
helper.DeleteProject(namespace)
if os.Getenv("KUBERNETES") == "true" {
helper.DeleteNamespace(namespace)
} else {
helper.DeleteProject(namespace)
}
helper.Chdir(currentWorkingDirectory)
helper.DeleteDir(context)
os.Unsetenv("GLOBALODOCONFIG")
Expand Down