Skip to content

Commit

Permalink
Remove tests for databricks_azure_adls_gen1_mount (databricks#1461)
Browse files Browse the repository at this point in the history
* Remove tests for `databricks_azure_adls_gen1_mount`
* Renamed `TEST_AWS_ACCOUNT_ID` to `AWS_ACCOUNT_ID`
  • Loading branch information
nfx committed Jul 20, 2022
1 parent 30ef010 commit 4029fd0
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 95 deletions.
2 changes: 1 addition & 1 deletion mws/acceptance/mws_private_access_settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestMwsAccPrivateAccessSettings(t *testing.T) {
resource "databricks_mws_private_access_settings" "this" {
account_id = "{env.DATABRICKS_ACCOUNT_ID}"
private_access_settings_name = "tf-{var.RANDOM}"
region = "{env.TEST_REGION}"
region = "{env.AWS_REGION}"
}`,
},
})
Expand Down
4 changes: 2 additions & 2 deletions mws/acceptance/mws_vpc_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ func TestMwsAccVpcEndpoint(t *testing.T) {
resource "databricks_mws_vpc_endpoint" "this" {
account_id = "{env.DATABRICKS_ACCOUNT_ID}"
vpc_endpoint_name = "tf-{var.RANDOM}"
region = "{env.TEST_REGION}"
region = "{env.AWS_REGION}"
aws_vpc_endpoint_id = "{env.TEST_RELAY_VPC_ENDPOINT}"
aws_account_id = "{env.TEST_AWS_ACCOUNT_ID}"
aws_account_id = "{env.AWS_ACCOUNT_ID}"
}`,
},
})
Expand Down
2 changes: 1 addition & 1 deletion mws/acceptance/mws_workspaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestMwsAccWorkspaces(t *testing.T) {
account_id = "{env.DATABRICKS_ACCOUNT_ID}"
workspace_name = "terra-{var.RANDOM}"
deployment_name = "terra-{var.RANDOM}"
aws_region = "{env.TEST_REGION}"
aws_region = "{env.AWS_REGION}"
credentials_id = databricks_mws_credentials.this.credentials_id
storage_configuration_id = databricks_mws_storage_configurations.this.storage_configuration_id
Expand Down
2 changes: 1 addition & 1 deletion mws/resource_mws_private_access_settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestMwsAccPAS(t *testing.T) {
t.Skip("skipping integration test in short mode.")
}
acctID := qa.GetEnvOrSkipTest(t, "DATABRICKS_ACCOUNT_ID")
awsRegion := qa.GetEnvOrSkipTest(t, "TEST_REGION")
awsRegion := qa.GetEnvOrSkipTest(t, "AWS_REGION")
client := common.CommonEnvironmentClient()
ctx := context.Background()
pasAPI := NewPrivateAccessSettingsAPI(ctx, client)
Expand Down
2 changes: 1 addition & 1 deletion mws/resource_mws_vpc_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestMwsAccVPCEndpointIntegration(t *testing.T) {
}
acctID := qa.GetEnvOrSkipTest(t, "DATABRICKS_ACCOUNT_ID")
awsvreID := qa.GetEnvOrSkipTest(t, "TEST_REST_API_VPC_ENDPOINT")
awsRegion := qa.GetEnvOrSkipTest(t, "TEST_REGION")
awsRegion := qa.GetEnvOrSkipTest(t, "AWS_REGION")
client := common.CommonEnvironmentClient()
ctx := context.Background()
vpcEndpointAPI := NewVPCEndpointAPI(ctx, client)
Expand Down
2 changes: 1 addition & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ By default, we don't encourage creation/destruction of infrastructure multiple t
* `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.
* `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.

* `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.
* `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.
* `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`.
* `awsmt` - AWS with Databricks Multitenant Workspace. Currently work in progress and the test environment cannot be fully started.
* 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`).
Expand Down
2 changes: 1 addition & 1 deletion scripts/awsmt-integration/require_env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DATABRICKS_ACCOUNT_ID
DATABRICKS_USERNAME
DATABRICKS_PASSWORD
TEST_REGION
AWS_REGION
TEST_CIDR
OWNER
2 changes: 1 addition & 1 deletion scripts/mws-integration/require_env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DATABRICKS_ACCOUNT_ID
DATABRICKS_USERNAME
DATABRICKS_PASSWORD
TEST_REGION
AWS_REGION
TEST_CIDR
OWNER
65 changes: 0 additions & 65 deletions storage/acceptance/azure_adls_gen1_mount_test.go

This file was deleted.

21 changes: 0 additions & 21 deletions storage/acceptance/mount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,6 @@ func TestAwsAccS3MountGeneric(t *testing.T) {
})
}

func TestAzureAccADLSv1MountGeneric(t *testing.T) {
client, mp := mountPointThroughReusedCluster(t)
if !client.IsAzureClientSecretSet() {
t.Skip("Test is meant only for client-secret conf Azure")
}
storageResource := qa.GetEnvOrSkipTest(t, "TEST_DATA_LAKE_STORE_NAME")
testWithNewSecretScope(t, func(scope, key string) {
testMounting(t, mp,
storage.GenericMount{
Adl: &storage.AzureADLSGen1MountGeneric{
ClientID: client.AzureClientID,
TenantID: client.AzureTenantID,
PrefixType: "dfs.adls",
StorageResource: storageResource,
Directory: "/",
SecretScope: scope,
SecretKey: key,
}})
}, client, mp.Name, client.AzureClientSecret)
}

func TestAzureAccADLSv2MountGeneric(t *testing.T) {
client, mp := mountPointThroughReusedCluster(t)
if !client.IsAzureClientSecretSet() {
Expand Down

0 comments on commit 4029fd0

Please sign in to comment.