-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] Use correct domain for Azure Gov and China (#4274)
## Changes <!-- Summary of your changes that are easy to understand --> Resolves #4272 ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [x] `make test` run locally - [ ] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [x] relevant acceptance tests are passing - [ ] using Go SDK
- Loading branch information
Showing
12 changed files
with
97 additions
and
58 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,11 +10,10 @@ import ( | |
|
||
"github.com/databricks/terraform-provider-databricks/qa" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestResourceAdlsGen2Mount_Create(t *testing.T) { | ||
d, err := qa.ResourceFixture{ | ||
qa.ResourceFixture{ | ||
Fixtures: []qa.HTTPFixture{ | ||
{ | ||
Method: "GET", | ||
|
@@ -51,8 +50,9 @@ func TestResourceAdlsGen2Mount_Create(t *testing.T) { | |
"initialize_file_system": true, | ||
}, | ||
Create: true, | ||
}.Apply(t) | ||
require.NoError(t, err) | ||
assert.Equal(t, "this_mount", d.Id()) | ||
assert.Equal(t, "abfss://[email protected]", d.Get("source")) | ||
Azure: true, | ||
}.ApplyAndExpectData(t, map[string]any{ | ||
"id": "this_mount", | ||
"source": "abfss://[email protected]", | ||
}) | ||
} |
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ import ( | |
) | ||
|
||
func TestResourceAzureBlobMountCreate(t *testing.T) { | ||
d, err := qa.ResourceFixture{ | ||
qa.ResourceFixture{ | ||
Fixtures: []qa.HTTPFixture{ | ||
{ | ||
Method: "GET", | ||
|
@@ -50,11 +50,12 @@ func TestResourceAzureBlobMountCreate(t *testing.T) { | |
"token_secret_key": "g", | ||
"token_secret_scope": "h", | ||
}, | ||
Azure: true, | ||
Create: true, | ||
}.Apply(t) | ||
require.NoError(t, err) | ||
assert.Equal(t, "e", d.Id()) | ||
assert.Equal(t, "wasbs://[email protected]/d", d.Get("source")) | ||
}.ApplyAndExpectData(t, map[string]any{ | ||
"id": "e", | ||
"source": "wasbs://[email protected]/d", | ||
}) | ||
} | ||
|
||
func TestResourceAzureBlobMountCreate_Error(t *testing.T) { | ||
|
@@ -86,6 +87,7 @@ func TestResourceAzureBlobMountCreate_Error(t *testing.T) { | |
"token_secret_scope": "h", | ||
}, | ||
Create: true, | ||
Azure: true, | ||
}.Apply(t) | ||
require.EqualError(t, err, "Some error") | ||
assert.Equal(t, "e", d.Id()) | ||
|
@@ -124,8 +126,9 @@ func TestResourceAzureBlobMountRead(t *testing.T) { | |
"token_secret_key": "g", | ||
"token_secret_scope": "h", | ||
}, | ||
ID: "e", | ||
Read: true, | ||
ID: "e", | ||
Read: true, | ||
Azure: true, | ||
}.Apply(t) | ||
require.NoError(t, err) | ||
assert.Equal(t, "e", d.Id()) | ||
|
@@ -165,6 +168,7 @@ func TestResourceAzureBlobMountRead_NotFound(t *testing.T) { | |
ID: "e", | ||
Read: true, | ||
Removed: true, | ||
Azure: true, | ||
}.ApplyNoError(t) | ||
} | ||
|
||
|
@@ -198,8 +202,9 @@ func TestResourceAzureBlobMountRead_Error(t *testing.T) { | |
"token_secret_key": "g", | ||
"token_secret_scope": "h", | ||
}, | ||
ID: "e", | ||
Read: true, | ||
ID: "e", | ||
Azure: true, | ||
Read: true, | ||
}.Apply(t) | ||
require.EqualError(t, err, "Some error") | ||
assert.Equal(t, "e", d.Id()) | ||
|
@@ -239,6 +244,7 @@ func TestResourceAzureBlobMountDelete(t *testing.T) { | |
}, | ||
ID: "e", | ||
Delete: true, | ||
Azure: true, | ||
}.Apply(t) | ||
require.NoError(t, err) | ||
assert.Equal(t, "e", d.Id()) | ||
|
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
Oops, something went wrong.