-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(project): fix failing tests (#1404)
(cherry picked from commit f64aa9b)
- Loading branch information
1 parent
03251ba
commit 371a796
Showing
1 changed file
with
19 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,12 @@ import ( | |
"testing" | ||
|
||
"github.com/aiven/aiven-go-client" | ||
acc "github.com/aiven/terraform-provider-aiven/internal/acctest" | ||
"github.com/aiven/terraform-provider-aiven/internal/schemautil" | ||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" | ||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" | ||
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform" | ||
|
||
acc "github.com/aiven/terraform-provider-aiven/internal/acctest" | ||
"github.com/aiven/terraform-provider-aiven/internal/schemautil" | ||
) | ||
|
||
func TestAccAivenProjectUser_basic(t *testing.T) { | ||
|
@@ -79,14 +80,19 @@ func testAccCheckAivenProjectUserResourceDestroy(s *terraform.State) error { | |
|
||
func testAccProjectUserResource(name string) string { | ||
return fmt.Sprintf(` | ||
resource "aiven_account" "foo" { | ||
name = "test-acc-ac-%[1]s" | ||
} | ||
resource "aiven_project" "foo" { | ||
project = "test-acc-pr-%s" | ||
project = "test-acc-pr-%[1]s" | ||
default_cloud = "aws-eu-west-2" | ||
account_id = aiven_account.foo.id | ||
} | ||
resource "aiven_project_user" "bar" { | ||
project = aiven_project.foo.project | ||
email = "ivan.savciuc+%[email protected]" | ||
email = "ivan.savciuc+%[1][email protected]" | ||
member_type = "admin" | ||
} | ||
|
@@ -95,19 +101,24 @@ data "aiven_project_user" "user" { | |
email = aiven_project_user.bar.email | ||
depends_on = [aiven_project_user.bar] | ||
}`, name, name) | ||
}`, name) | ||
} | ||
|
||
func testAccProjectUserDeveloperResource(name string) string { | ||
return fmt.Sprintf(` | ||
resource "aiven_account" "foo" { | ||
name = "test-acc-ac-%[1]s" | ||
} | ||
resource "aiven_project" "foo" { | ||
project = "test-acc-pr-%s" | ||
project = "test-acc-pr-%[1]s" | ||
default_cloud = "aws-eu-west-2" | ||
account_id = aiven_account.foo.id | ||
} | ||
resource "aiven_project_user" "bar" { | ||
project = aiven_project.foo.project | ||
email = "ivan.savciuc+%[email protected]" | ||
email = "ivan.savciuc+%[1][email protected]" | ||
member_type = "developer" | ||
} | ||
|
@@ -116,7 +127,7 @@ data "aiven_project_user" "user" { | |
email = aiven_project_user.bar.email | ||
depends_on = [aiven_project_user.bar] | ||
}`, name, name) | ||
}`, name) | ||
} | ||
|
||
func testAccCheckAivenProjectUserAttributes(n string) resource.TestCheckFunc { | ||
|