-
Notifications
You must be signed in to change notification settings - Fork 108
Add cloud-only acceptance tests for ssh tunnel #3825
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
base: ssh-tunnel-integ-tests
Are you sure you want to change the base?
Conversation
d307bfa to
a988e53
Compare
24d5662 to
eb3c747
Compare
41 failing tests:
|
| @@ -0,0 +1,8 @@ | |||
| errcode $CLI ssh connect --cluster=$TEST_DEFAULT_CLUSTER_ID --releases-dir=$CLI_RELEASES_DIR -- "echo 'Connection successful'" >LOG.stdout 2>LOG.stderr | |||
|
|
|||
| cat LOG.stdout | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: If you want to record stdout, typically you'd save it to out.stdout.txt (no cat necessary, out* are persisted)
| } | ||
|
|
||
| func CreateReleaseArtifact(t *testing.T, cwd, releasesDir, osName, arch string) { | ||
| tempBuildDir := filepath.Join(releasesDir, "tmp_"+arch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this directory called tmp_ ? Is it cleaned up?
This is similar to BuildCLI() and there we build into the same directory, it's faster on second run when file is already present and nothing changed.
Can we re-use BuildCLI() function here? This will reuse build cache. When run on linux it will also re-use build artifact (even if you call go build for second time, it'll be faster).
| zipName := fmt.Sprintf("databricks_cli_%s_%s.zip", osName, arch) | ||
| zipPath := filepath.Join(releasesDir, zipName) | ||
|
|
||
| zipFile, err := os.Create(zipPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we skip zipping if its mtime > mtime of the binary?
Changes
Based on #3775
Make a simple connection with "echo 'Hello'" and check that databricks ssh connect output has it.
SSH tunnel requires linux releases to be present, so it can upload them to the workspace for the ssh server to use. Added the build step directly to the acceptance_test, similar to how we build the CLI itself there. Initially I've modified our runner to install goreleaser and running make snapshot-release, but it takes over 10m on linux machines. Current build step only adds ~1m to the test time.