-
Notifications
You must be signed in to change notification settings - Fork 354
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
mounts now handle deleted cluster correctly #87
Merged
stikkireddy
merged 13 commits into
databricks:master
from
storey247:ds/fix-mountclustermissing
Jun 11, 2020
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
babef36
mounts now handle deleted cluster correctly
546bc56
reverting change to the test clientid
d3c6272
added logic to prevent mount point duplication
191aa0e
Merge branch 'master' into ds/fix-mountclustermissing
27a4030
fixing logic in blob mount
d020a93
Merge branch 'ds/fix-mountclustermissing' of https://github.com/store…
56e0c63
fix lint issues
ce716b9
patching up gen1 mount & blob creation error check
f4e1d54
updated documentation
160e48d
further updates
d6b3504
Merge branch 'master' into ds/fix-mountclustermissing
11885f2
fixing import statements
164ea0b
Merge branch 'ds/fix-mountclustermissing' of https://github.com/store…
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package databricks | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestIsClusterMissingTrueWhenClusterIdSpecifiedPresent(t *testing.T) { | ||
errorMessage := "{\"error_code\":\"INVALID_PARAMETER_VALUE\",\"message\":\"Cluster 123 does not exist\"}" | ||
|
||
result := isClusterMissing(errorMessage, "123") | ||
|
||
assert.True(t, result) | ||
} | ||
|
||
func TestIsClusterMissingFalseWhenClusterIdSpecifiedNotPresent(t *testing.T) { | ||
errorMessage := "{\"error_code\":\"INVALID_PARAMETER_VALUE\",\"message\":\"Cluster 123 does not exist\"}" | ||
|
||
result := isClusterMissing(errorMessage, "xyz") | ||
|
||
assert.False(t, result) | ||
} | ||
|
||
func TestIsClusterMissingFalseWhenErrorNotInCorrectFormat(t *testing.T) { | ||
errorMessage := "{\"error_code\":\"INVALID_PARAMETER_VALUE\",\"message\":\"Something random went bang xyz\"}" | ||
|
||
result := isClusterMissing(errorMessage, "xyz") | ||
|
||
assert.False(t, result) | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What was the reason for changing this?
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.
hmmmmmm, i think this was when i was struggling to get the tests running as the .env wasn't applying and clientID was being set to null causing tests to fail.
I since figured out the issue there so can probably roll this back. The actual values of
ARM_CLIENT_ID
andDATABRICKS_AZURE_CLIENT_ID
are the same though.Will revert this change :)