Skip to content

Commit

Permalink
fix tests: adding "terraform-default-" and kubeclt v1.30.0
Browse files Browse the repository at this point in the history
  • Loading branch information
truszkowski committed May 14, 2024
1 parent cc36747 commit 06f5796
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion spacelift/data_aws_integration_attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestAWSIntegrationAttachmentData(t *testing.T) {
Check: Resource(
resourceName,
Attribute("id", IsNotEmpty()),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
AttributeNotPresent("stack_id"),
),
}})
Expand Down
4 changes: 2 additions & 2 deletions spacelift/data_aws_role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestAWSRoleData(t *testing.T) {
Check: Resource(
"data.spacelift_aws_role.test",
Attribute("id", IsNotEmpty()),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
Attribute("role_arn", Equals("arn:aws:iam::039653571618:role/empty-test-role")),
Attribute("generate_credentials_in_worker", Equals("false")),
Attribute("duration_seconds", Equals("931")),
Expand Down Expand Up @@ -138,7 +138,7 @@ func TestAWSRoleData(t *testing.T) {
Check: Resource(
"data.spacelift_aws_role.test",
Attribute("id", IsNotEmpty()),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
Attribute("role_arn", Equals("custom_role_arn")),
Attribute("generate_credentials_in_worker", Equals("true")),
Attribute("external_id", Equals("external@id")),
Expand Down
2 changes: 1 addition & 1 deletion spacelift/data_azure_integration_attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestAzureIntegrationAttachmentData(t *testing.T) {
Check: Resource(
resourceName,
Attribute("id", IsNotEmpty()),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
AttributeNotPresent("stack_id"),
),
}})
Expand Down
2 changes: 1 addition & 1 deletion spacelift/data_context_attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestContextAttachmentData(t *testing.T) {
Check: Resource(
"data.spacelift_context_attachment.test",
Attribute("id", IsNotEmpty()),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
Attribute("priority", Equals("1")),
AttributeNotPresent("stack_id"),
),
Expand Down
2 changes: 1 addition & 1 deletion spacelift/data_environment_variable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestEnvironmentVariableData(t *testing.T) {
`, randomID),
Check: Resource(
"data.spacelift_environment_variable.test",
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
Attribute("value", Equals("is tasty")),
Attribute("write_only", Equals("false")),
AttributeNotPresent("context_id"),
Expand Down
2 changes: 1 addition & 1 deletion spacelift/data_gcp_service_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestGCPServiceAccountData(t *testing.T) {
Check: Resource(
"data.spacelift_gcp_service_account.test",
Attribute("id", IsNotEmpty()),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
Attribute("service_account_email", IsNotEmpty()),
SetEquals("token_scopes", "https://www.googleapis.com/auth/compute"),
AttributeNotPresent("stack_id"),
Expand Down
2 changes: 1 addition & 1 deletion spacelift/data_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestModuleData(t *testing.T) {
`, randomID),
Check: Resource(
"data.spacelift_module.test",
Attribute("id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
Attribute("administrative", Equals("true")),
Attribute("branch", Equals("master")),
Attribute("description", Equals("description")),
Expand Down
2 changes: 1 addition & 1 deletion spacelift/data_mounted_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestMountedFileData(t *testing.T) {
`, randomID),
Check: Resource(
"data.spacelift_mounted_file.test",
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
Attribute("content", Equals("YmFjb24gaXMgdGFzdHk=")),
Attribute("write_only", Equals("false")),
AttributeNotPresent("context_id"),
Expand Down
2 changes: 1 addition & 1 deletion spacelift/data_stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func TestStackData(t *testing.T) {
`, randomID),
Check: Resource(
"data.spacelift_stack.test",
Attribute("kubernetes.0.kubectl_version", Equals("1.23.5")),
Attribute("kubernetes.0.kubectl_version", Equals("1.30.0")),
),
}})
})
Expand Down
2 changes: 1 addition & 1 deletion spacelift/data_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func TestWebhookData(t *testing.T) {
Attribute("endpoint", Equals("https://bacon.org")),
Attribute("enabled", Equals("true")),
Attribute("secret", Equals("very-very-secret")),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
AttributeNotPresent("stack_id"),
),
}})
Expand Down
6 changes: 3 additions & 3 deletions spacelift/resource_aws_role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func TestAWSRoleResource(t *testing.T) {
Check: Resource(
resourceName,
Attribute("id", IsNotEmpty()),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
Attribute("generate_credentials_in_worker", Equals("false")),
Attribute("duration_seconds", Equals("942")),
Attribute("external_id", IsEmpty()),
Expand All @@ -94,7 +94,7 @@ func TestAWSRoleResource(t *testing.T) {
{
ResourceName: resourceName,
ImportState: true,
ImportStateId: fmt.Sprintf("module/test-module-%s", randomID),
ImportStateId: fmt.Sprintf("module/terraform-default-test-module-%s", randomID),
ImportStateVerify: true,
},
})
Expand Down Expand Up @@ -150,7 +150,7 @@ func TestAWSRoleResource(t *testing.T) {
Check: Resource(
"spacelift_aws_role.test",
Attribute("id", IsNotEmpty()),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
Attribute("generate_credentials_in_worker", Equals("true")),
Attribute("external_id", IsEmpty()),
AttributeNotPresent("stack_id"),
Expand Down
4 changes: 2 additions & 2 deletions spacelift/resource_context_attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ func TestContextAttachmentResource(t *testing.T) {
Check: Resource(
"spacelift_context_attachment.test",
Attribute("id", IsNotEmpty()),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
AttributeNotPresent("stack_id"),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateId: fmt.Sprintf("test-context-%s/test-module-%s", randomID, randomID),
ImportStateId: fmt.Sprintf("test-context-%s/terraform-default-test-module-%s", randomID, randomID),
ImportStateVerify: true,
}})
})
Expand Down
2 changes: 1 addition & 1 deletion spacelift/resource_environment_variable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func TestEnvironmentVariableResource(t *testing.T) {
`, randomID),
Check: Resource(
resourceName,
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
Attribute("value", Equals("4d5d01ea427b10dd483e8fce5b5149fb5a9814e9ee614176b756ca4a65c8f154")),
Attribute("write_only", Equals("true")),
AttributeNotPresent("context_id"),
Expand Down
4 changes: 2 additions & 2 deletions spacelift/resource_gcp_service_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ func TestGCPServiceAccountResource(t *testing.T) {
Check: Resource(
resourceName,
Attribute("id", IsNotEmpty()),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateId: fmt.Sprintf("module/test-module-%s", randomID),
ImportStateId: fmt.Sprintf("module/terraform-default-test-module-%s", randomID),
ImportStateVerify: true,
},
})
Expand Down
8 changes: 4 additions & 4 deletions spacelift/resource_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestModuleResource(t *testing.T) {
Config: config("old description", true, false),
Check: Resource(
"spacelift_module.test",
Attribute("id", Equals(fmt.Sprintf("github-module-%s", randomID))),
Attribute("id", Equals(fmt.Sprintf("terraform-default-github-module-%s", randomID))),
Attribute("administrative", Equals("true")),
Attribute("branch", Equals("master")),
Attribute("description", Equals("old description")),
Expand Down Expand Up @@ -95,7 +95,7 @@ func TestModuleResource(t *testing.T) {
Config: config("test-root/ab"),
Check: Resource(
"spacelift_module.test",
Attribute("id", Equals(fmt.Sprintf("project-root-%s", randomID))),
Attribute("id", Equals(fmt.Sprintf("terraform-papaya-project-root-%s", randomID))),
Attribute("administrative", Equals("true")),
Attribute("branch", Equals("master")),
Attribute("description", Equals("description")),
Expand Down Expand Up @@ -286,7 +286,7 @@ func TestModuleResourceSpace(t *testing.T) {
Config: config("old description", true),
Check: Resource(
"spacelift_module.test",
Attribute("id", Equals(fmt.Sprintf("github-module-%s", randomID))),
Attribute("id", Equals(fmt.Sprintf("terraform-default-github-module-%s", randomID))),
Attribute("administrative", Equals("true")),
Attribute("branch", Equals("master")),
Attribute("description", Equals("old description")),
Expand Down Expand Up @@ -342,7 +342,7 @@ func TestModuleResourceSpace(t *testing.T) {
Config: config("test-root/ab"),
Check: Resource(
"spacelift_module.test",
Attribute("id", Equals(fmt.Sprintf("project-root-%s", randomID))),
Attribute("id", Equals(fmt.Sprintf("terraform-papaya-project-root-%s", randomID))),
Attribute("administrative", Equals("true")),
Attribute("branch", Equals("master")),
Attribute("description", Equals("description")),
Expand Down
2 changes: 1 addition & 1 deletion spacelift/resource_mounted_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestMountedFileResource(t *testing.T) {
`, randomID),
Check: Resource(
resourceName,
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
Attribute("write_only", Equals("true")),
),
},
Expand Down
4 changes: 2 additions & 2 deletions spacelift/resource_policy_attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ func TestPolicyAttachmentResource(t *testing.T) {
resourceName,
Attribute("id", IsNotEmpty()),
Attribute("policy_id", Contains(randomID)),
Attribute("module_id", Equals(fmt.Sprintf("test-module-%s", randomID))),
Attribute("module_id", Equals(fmt.Sprintf("terraform-default-test-module-%s", randomID))),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateId: fmt.Sprintf("my-first-policy-%s/test-module-%s", randomID, randomID),
ImportStateId: fmt.Sprintf("my-first-policy-%s/terraform-default-test-module-%s", randomID, randomID),
ImportStateVerify: true,
},
})
Expand Down
4 changes: 2 additions & 2 deletions spacelift/resource_stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ func TestStackResource(t *testing.T) {
resourceName,
Attribute("id", StartsWith("provider-test-stack")),
Attribute("kubernetes.0.namespace", Equals("")),
Attribute("kubernetes.0.kubectl_version", Equals("1.23.5")),
Attribute("kubernetes.0.kubectl_version", Equals("1.30.0")),
Attribute("ansible.#", Equals("0")),
Attribute("pulumi.#", Equals("0")),
Attribute("cloudformation.#", Equals("0")),
Expand All @@ -503,7 +503,7 @@ func TestStackResource(t *testing.T) {
resourceName,
Attribute("id", StartsWith("provider-test-stack")),
Attribute("kubernetes.0.namespace", Equals("myapp-prod")),
Attribute("kubernetes.0.kubectl_version", Equals("1.23.5")),
Attribute("kubernetes.0.kubectl_version", Equals("1.30.0")),
Attribute("ansible.#", Equals("0")),
Attribute("pulumi.#", Equals("0")),
Attribute("cloudformation.#", Equals("0")),
Expand Down
2 changes: 1 addition & 1 deletion spacelift/resource_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestWebhookResource(t *testing.T) {
{
ResourceName: resourceName,
ImportState: true,
ImportStateIdPrefix: fmt.Sprintf("module/test-module-%s/", randomID),
ImportStateIdPrefix: fmt.Sprintf("module/terraform-default-test-module-%s/", randomID),
ImportStateVerify: true,
},
})
Expand Down

0 comments on commit 06f5796

Please sign in to comment.