Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testcase: fix cdn testcae. #6821

Merged
merged 1 commit into from
Jan 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions alicloud/resource_alicloud_cdn_domain_new_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func TestAccAlicloudCDNDomainNew_basic(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccConfig(map[string]interface{}{
"domain_name": "xxxx.myalicdn.com",
"domain_name": name,
"cdn_type": "web",
"scope": "domestic",
"resource_group_id": "${data.alicloud_resource_manager_resource_groups.default.groups.0.id}",
Expand All @@ -130,7 +130,7 @@ func TestAccAlicloudCDNDomainNew_basic(t *testing.T) {
}),
Check: resource.ComposeTestCheckFunc(
testAccCheck(map[string]string{
"domain_name": "xxxx.myalicdn.com",
"domain_name": CHECKSET,
"scope": "domestic",
"resource_group_id": CHECKSET,
"sources.#": "1",
Expand Down Expand Up @@ -460,7 +460,7 @@ func TestAccAlicloudCdnDomain_basic3176(t *testing.T) {
rac := resourceAttrCheckInit(rc, ra)
testAccCheck := rac.resourceAttrMapUpdateSet()
rand := acctest.RandIntRange(10000, 99999)
name := fmt.Sprintf("tf-testacc%scdndomain%d", defaultRegionToTest, rand)
name := fmt.Sprintf("tf-testacc%s%d.alicloud-provider.cn", defaultRegionToTest, rand)
testAccConfig := resourceTestAccConfigFunc(resourceId, name, AlicloudCdnDomainBasicDependence3176)
resource.Test(t, resource.TestCase{
PreCheck: func() {
Expand All @@ -472,7 +472,7 @@ func TestAccAlicloudCdnDomain_basic3176(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccConfig(map[string]interface{}{
"domain_name": "wkk.pfytlm.xyz",
"domain_name": name,
"cdn_type": "web",
"sources": []map[string]interface{}{
{
Expand All @@ -486,7 +486,7 @@ func TestAccAlicloudCdnDomain_basic3176(t *testing.T) {
}),
Check: resource.ComposeTestCheckFunc(
testAccCheck(map[string]string{
"domain_name": "wkk.pfytlm.xyz",
"domain_name": CHECKSET,
"cdn_type": "web",
"sources.#": "1",
}),
Expand Down Expand Up @@ -577,7 +577,7 @@ func TestAccAlicloudCdnDomain_basic3176_twin(t *testing.T) {
rac := resourceAttrCheckInit(rc, ra)
testAccCheck := rac.resourceAttrMapUpdateSet()
rand := acctest.RandIntRange(10000, 99999)
name := fmt.Sprintf("tf-testacc%scdndomain%d", defaultRegionToTest, rand)
name := fmt.Sprintf("tf-testacc%s%d.alicloud-provider.cn", defaultRegionToTest, rand)
testAccConfig := resourceTestAccConfigFunc(resourceId, name, AlicloudCdnDomainBasicDependence3176)
resource.Test(t, resource.TestCase{
PreCheck: func() {
Expand All @@ -590,7 +590,7 @@ func TestAccAlicloudCdnDomain_basic3176_twin(t *testing.T) {
{
Config: testAccConfig(map[string]interface{}{
"scope": "domestic",
"domain_name": "wkk.pfytlm.xyz",
"domain_name": name,
"cdn_type": "web",
"sources": []map[string]interface{}{
{
Expand All @@ -609,7 +609,7 @@ func TestAccAlicloudCdnDomain_basic3176_twin(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheck(map[string]string{
"scope": "domestic",
"domain_name": "wkk.pfytlm.xyz",
"domain_name": CHECKSET,
"cdn_type": "web",
"sources.#": "1",
"tags.%": "2",
Expand Down
Loading