-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add acceptance tests #2081
Add acceptance tests #2081
Conversation
b036c0c
to
60b1a77
Compare
d9a41f8
to
1dbab3c
Compare
1dbab3c
to
28a69a1
Compare
5e0f5f3
to
30aa795
Compare
6be8afb
to
151e62f
Compare
acceptance/variables/complex/script
Outdated
@@ -0,0 +1,4 @@ | |||
$CLI bundle validate -o json | jq '{resources,variables}' > out.default.json |
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.
since it's a bash script, shall we better name it script.sh
to make it more clear?
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.
I don't know if 'bash' is going to stay or it is going to be the only thing that's used.
I think we might want to support other runners, especially for interactive use case. For example, expect or pexpect https://pexpect.readthedocs.io/en/stable/overview.html
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.
Idea: We could use the extension to determine the runner? script.sh
vs script.py
?
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.
We could still do that once we have add another runner. script for current bash case and script.py for python runner.
1. move databricks.yml; remove workspace.host from it. 2. add script 3. generate output.txt: TESTS_OUTPUT=OVERWRITE go test -v ./... -run TestAccept/clusters
384b212
to
2d6504e
Compare
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.
A few small remaining things. Approving to unblock merge.
break | ||
} | ||
|
||
dir = filepath.Dir(dir) |
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.
Please add a require.True(t, filepath.IsLocal(dir))
in there to make sure this remains true.
Changes
As these tests run against compiled binary and can capture full output of the command, they can be useful to support major changes such as refactoring internal logging / diagnostics or complex variable interpolation.
These are currently run as part of 'make test' but the intention is to run them as part of integration tests as well.
Benefits
Gaps
The tests currently share the test server and there is global place to define handlers. We should have a way for tests to override / add new handlers.
Tests
I manually checked that output of new acceptance tests matches previous asserts.