-
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(account): fix filing team tests
- Loading branch information
1 parent
f64aa9b
commit 20ad53a
Showing
7 changed files
with
64 additions
and
25 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
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ import ( | |
"context" | ||
"fmt" | ||
"log" | ||
"os" | ||
"testing" | ||
|
||
"github.com/aiven/aiven-go-client/v2" | ||
|
@@ -16,6 +17,10 @@ import ( | |
) | ||
|
||
func TestAccAivenAccountTeamMember_basic(t *testing.T) { | ||
if _, ok := os.LookupEnv("AIVEN_ORGANIZATION_NAME"); !ok { | ||
t.Skip("AIVEN_ORGANIZATION_NAME env variable is required to run this test") | ||
} | ||
|
||
resourceName := "aiven_account_team_member.foo" | ||
rName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) | ||
|
||
|
@@ -37,20 +42,22 @@ func TestAccAivenAccountTeamMember_basic(t *testing.T) { | |
} | ||
|
||
func testAccAccountTeamMemberResource(name string) string { | ||
orgName := os.Getenv("AIVEN_ORGANIZATION_NAME") | ||
|
||
return fmt.Sprintf(` | ||
resource "aiven_account" "foo" { | ||
name = "test-acc-ac-%s" | ||
data "aiven_account" "foo" { | ||
name = "%[1]s" | ||
} | ||
resource "aiven_account_team" "foo" { | ||
account_id = aiven_account.foo.account_id | ||
name = "test-acc-team-%s" | ||
account_id = data.aiven_account.foo.account_id | ||
name = "test-acc-team-%[2]s" | ||
} | ||
resource "aiven_account_team_member" "foo" { | ||
team_id = aiven_account_team.foo.team_id | ||
account_id = aiven_account_team.foo.account_id | ||
user_email = "ivan.savciuc+%[email protected]" | ||
user_email = "ivan.savciuc+%[2][email protected]" | ||
} | ||
data "aiven_account_team_member" "member" { | ||
|
@@ -59,7 +66,7 @@ data "aiven_account_team_member" "member" { | |
user_email = aiven_account_team_member.foo.user_email | ||
depends_on = [aiven_account_team_member.foo] | ||
}`, name, name, name) | ||
}`, orgName, name) | ||
} | ||
|
||
func testAccCheckAivenAccountTeamMemberResourceDestroy(s *terraform.State) error { | ||
|
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