Skip to content

Commit 35c7856

Browse files
authored
Remove tests for databricks_azure_adls_gen1_mount (#1461)
* Remove tests for `databricks_azure_adls_gen1_mount` * Renamed `TEST_AWS_ACCOUNT_ID` to `AWS_ACCOUNT_ID`
1 parent e537f4b commit 35c7856

File tree

13 files changed

+17
-103
lines changed

13 files changed

+17
-103
lines changed

mws/acceptance/mws_private_access_settings_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestMwsAccPrivateAccessSettings(t *testing.T) {
1818
resource "databricks_mws_private_access_settings" "this" {
1919
account_id = "{env.DATABRICKS_ACCOUNT_ID}"
2020
private_access_settings_name = "tf-{var.RANDOM}"
21-
region = "{env.TEST_REGION}"
21+
region = "{env.AWS_REGION}"
2222
}`,
2323
},
2424
})

mws/acceptance/mws_vpc_endpoint_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ func TestMwsAccVpcEndpoint(t *testing.T) {
1818
resource "databricks_mws_vpc_endpoint" "this" {
1919
account_id = "{env.DATABRICKS_ACCOUNT_ID}"
2020
vpc_endpoint_name = "tf-{var.RANDOM}"
21-
region = "{env.TEST_REGION}"
21+
region = "{env.AWS_REGION}"
2222
aws_vpc_endpoint_id = "{env.TEST_RELAY_VPC_ENDPOINT}"
23-
aws_account_id = "{env.TEST_AWS_ACCOUNT_ID}"
23+
aws_account_id = "{env.AWS_ACCOUNT_ID}"
2424
}`,
2525
},
2626
})

mws/acceptance/mws_workspaces_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func TestMwsAccWorkspaces(t *testing.T) {
4949
account_id = "{env.DATABRICKS_ACCOUNT_ID}"
5050
workspace_name = "terra-{var.RANDOM}"
5151
deployment_name = "terra-{var.RANDOM}"
52-
aws_region = "{env.TEST_REGION}"
52+
aws_region = "{env.AWS_REGION}"
5353
5454
credentials_id = databricks_mws_credentials.this.credentials_id
5555
storage_configuration_id = databricks_mws_storage_configurations.this.storage_configuration_id

mws/resource_mws_private_access_settings_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestMwsAccPAS(t *testing.T) {
1717
t.Skip("skipping integration test in short mode.")
1818
}
1919
acctID := qa.GetEnvOrSkipTest(t, "DATABRICKS_ACCOUNT_ID")
20-
awsRegion := qa.GetEnvOrSkipTest(t, "TEST_REGION")
20+
awsRegion := qa.GetEnvOrSkipTest(t, "AWS_REGION")
2121
client := common.CommonEnvironmentClient()
2222
ctx := context.Background()
2323
pasAPI := NewPrivateAccessSettingsAPI(ctx, client)

mws/resource_mws_vpc_endpoint_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func TestMwsAccVPCEndpointIntegration(t *testing.T) {
2020
}
2121
acctID := qa.GetEnvOrSkipTest(t, "DATABRICKS_ACCOUNT_ID")
2222
awsvreID := qa.GetEnvOrSkipTest(t, "TEST_REST_API_VPC_ENDPOINT")
23-
awsRegion := qa.GetEnvOrSkipTest(t, "TEST_REGION")
23+
awsRegion := qa.GetEnvOrSkipTest(t, "AWS_REGION")
2424
client := common.CommonEnvironmentClient()
2525
ctx := context.Background()
2626
vpcEndpointAPI := NewVPCEndpointAPI(ctx, client)

scripts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ By default, we don't encourage creation/destruction of infrastructure multiple t
1111
* `azcli` - Azure authenticated with `az login` command. No `require_env` file needed. Runnable test name prefixes are `TestAcc` and `TestAzureAcc`. By far, the simplest way to develop provider's functionality.
1212
* `azsp` - Azure authenticated with Service Principal's ID/Secret pairs. Runnable test name prefixes are `TestAcc` and `TestAzureAcc`. Service pricipal must have `Storage Blob Data Contributor` role on ADLS account used. `ARM_SUBSCRIPTION_ID`, `ARM_CLIENT_SECRET`, `ARM_CLIENT_ID`, `ARM_TENANT_ID`, `OWNER` environment vars required. Note that these integration tests will use service principal based auth. Even though it is using a service principal, it will still be generating a personal access token to perform creation of resources.
1313

14-
* `mws` - AWS with Databricks Multiworkspace API. Runnable test name prefix is `TestMws`. Please [check if you're able to use it](https://docs.databricks.com/administration-guide/multiworkspace/new-workspace-aws.html). Required variables are `DATABRICKS_ACCOUNT_ID`, `DATABRICKS_USERNAME`, `DATABRICKS_PASSWORD` (something you use for https://accounts.cloud.databricks.com/), `TEST_REGION`, `TEST_CIDR`, `OWNER`. Only multiworkspace resources are tested.
14+
* `mws` - AWS with Databricks Multiworkspace API. Runnable test name prefix is `TestMws`. Please [check if you're able to use it](https://docs.databricks.com/administration-guide/multiworkspace/new-workspace-aws.html). Required variables are `DATABRICKS_ACCOUNT_ID`, `DATABRICKS_USERNAME`, `DATABRICKS_PASSWORD` (something you use for https://accounts.cloud.databricks.com/), `AWS_REGION`, `TEST_CIDR`, `OWNER`. Only multiworkspace resources are tested.
1515
* `awsst` - `DATABRICKS_CONFIG_PROFILE` (section within Databricks CLI `~/.databrickscfg` file) & `CLOUD_ENV=AWS`. In case you want to test provider on existing development single-tenant shard. Runnable test name prefixes are `TestAcc` and `TestAwsAcc`.
1616
* `awsmt` - AWS with Databricks Multitenant Workspace. Currently work in progress and the test environment cannot be fully started.
1717
* most of the tests should aim to be cloud-agnostic. Though, in case of specific branching needed, you can check `CLOUD_ENV` value (possible values are `Azure`, `AWS` & `MWS`).

scripts/awsmt-integration/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ locals {
1212
// dltp - databricks labs terraform provider
1313
prefix = "dltp${random_string.naming.result}"
1414
cidr_block = data.external.env.result.TEST_CIDR
15-
region = data.external.env.result.TEST_REGION
15+
region = data.external.env.result.AWS_REGION
1616
account_id = data.external.env.result.DATABRICKS_ACCOUNT_ID
1717
tags = {
1818
Environment = "Testing"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
DATABRICKS_ACCOUNT_ID
22
DATABRICKS_USERNAME
33
DATABRICKS_PASSWORD
4-
TEST_REGION
4+
AWS_REGION
55
TEST_CIDR
66
OWNER

scripts/mws-integration/main.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ resource "random_string" "naming" {
1414
locals {
1515
// dltp - databricks labs terraform provider
1616
prefix = "dltp${random_string.naming.result}"
17-
region = data.external.env.result.TEST_REGION
17+
region = data.external.env.result.AWS_REGION
1818
cidr = data.external.env.result.TEST_CIDR
1919
tags = {
2020
Environment = "Testing"
@@ -238,10 +238,14 @@ resource "aws_kms_alias" "customer_managed_key_alias" {
238238

239239
data "aws_caller_identity" "current" {}
240240

241-
output "test_aws_account_id" {
241+
output "aws_account_id" {
242242
value = data.aws_caller_identity.current.account_id
243243
}
244244

245+
output "aws_region" {
246+
value = local.region
247+
}
248+
245249
output "test_rest_api_vpc_endpoint" {
246250
value = aws_vpc_endpoint.rest_api.id
247251
}
@@ -291,10 +295,6 @@ output "test_prefix" {
291295
value = local.prefix
292296
}
293297

294-
output "test_region" {
295-
value = local.region
296-
}
297-
298298
output "databricks_account_id" {
299299
value = data.external.env.result.DATABRICKS_ACCOUNT_ID
300300
sensitive = true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
DATABRICKS_ACCOUNT_ID
22
DATABRICKS_USERNAME
33
DATABRICKS_PASSWORD
4-
TEST_REGION
4+
AWS_REGION
55
TEST_CIDR
66
OWNER

0 commit comments

Comments
 (0)