forked from huaweicloud/terraform-provider-huaweicloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(workspace): adjust the resource references and definitions (huaw…
- Loading branch information
1 parent
53df492
commit 37b9428
Showing
12 changed files
with
178 additions
and
139 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 |
---|---|---|
|
@@ -29,19 +29,44 @@ func TestAccResourceAppGroupAuthorization_basic(t *testing.T) { | |
|
||
func testAccAppGroupAuthorization_base(name string) string { | ||
return fmt.Sprintf(` | ||
%[1]s | ||
data "huaweicloud_workspace_service" "test" {} | ||
resource "huaweicloud_workspace_app_server_group" "test" { | ||
name = "%[1]s" | ||
os_type = "Windows" | ||
flavor_id = "%[2]s" | ||
vpc_id = data.huaweicloud_workspace_service.test.vpc_id | ||
subnet_id = data.huaweicloud_workspace_service.test.network_ids[0] | ||
system_disk_type = "SAS" | ||
system_disk_size = 80 | ||
is_vdi = true | ||
app_type = "SESSION_DESKTOP_APP" | ||
image_id = "%[3]s" | ||
image_type = "gold" | ||
image_product_id = "%[4]s" | ||
} | ||
resource "huaweicloud_workspace_app_group" "test" { | ||
server_group_id = huaweicloud_workspace_app_server_group.test.id | ||
name = "%[1]s" | ||
type = "SESSION_DESKTOP_APP" | ||
description = "Created APP group by script" | ||
} | ||
resource "huaweicloud_workspace_user" "test" { | ||
name = "%[2]s" | ||
name = "%[1]s" | ||
email = "[email protected]" | ||
} | ||
resource "huaweicloud_workspace_user_group" "test" { | ||
count = 2 | ||
name = "%[2]s${count.index}" | ||
name = "%[1]s${count.index}" | ||
type = "LOCAL" | ||
} | ||
`, testResourceWorkspaceAppGroup_basic_step1(name), name) | ||
`, name, acceptance.HW_WORKSPACE_APP_SERVER_GROUP_FLAVOR_ID, | ||
acceptance.HW_WORKSPACE_APP_SERVER_GROUP_IMAGE_ID, | ||
acceptance.HW_WORKSPACE_APP_SERVER_GROUP_IMAGE_PRODUCT_ID) | ||
} | ||
|
||
func testAccAppGroupAuthorization_basic(name string) string { | ||
|
@@ -114,5 +139,5 @@ resource "huaweicloud_workspace_app_group_authorization" "test" { | |
type = "USER" | ||
} | ||
} | ||
`, testResourceWorkspaceAppGroup_basic_step1(name), name) | ||
`, testResourceWorkspaceAppGroup_basic_step1(testResourceWorkspaceAppGroup_base(name), name), name) | ||
} |
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
Oops, something went wrong.