2828 httpRedirectSingularDataSourceRepresentation = map [string ]interface {}{
2929 "http_redirect_id" : Representation {repType : Required , create : `${oci_waas_http_redirect.test_http_redirect.id}` },
3030 }
31+ domainName = randomString (6 , charsetWithoutDigits ) + ".com"
3132
3233 httpRedirectDataSourceRepresentation = map [string ]interface {}{
3334 "compartment_id" : Representation {repType : Required , create : `${var.compartment_id}` },
4445
4546 httpRedirectRepresentation = map [string ]interface {}{
4647 "compartment_id" : Representation {repType : Required , create : `${var.compartment_id}` },
47- "domain" : Representation {repType : Required , create : `example.com` },
48+ "domain" : Representation {repType : Required , create : domainName },
4849 "target" : RepresentationGroup {Required , httpRedirectTargetRepresentation },
4950 "defined_tags" : Representation {repType : Optional , create : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}` , update : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}` },
5051 "display_name" : Representation {repType : Optional , create : `displayName` , update : `displayName2` },
@@ -94,7 +95,7 @@ func TestWaasHttpRedirectResource_basic(t *testing.T) {
9495 generateResourceFromRepresentationMap ("oci_waas_http_redirect" , "test_http_redirect" , Required , Create , httpRedirectRepresentation ),
9596 Check : resource .ComposeAggregateTestCheckFunc (
9697 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentId ),
97- resource .TestCheckResourceAttr (resourceName , "domain" , "example.com" ),
98+ resource .TestCheckResourceAttr (resourceName , "domain" , domainName ),
9899 resource .TestCheckResourceAttr (resourceName , "target.#" , "1" ),
99100 resource .TestCheckResourceAttr (resourceName , "target.0.host" , "example1.com" ),
100101 resource .TestCheckResourceAttr (resourceName , "target.0.path" , "/test{path}" ),
@@ -120,7 +121,7 @@ func TestWaasHttpRedirectResource_basic(t *testing.T) {
120121 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentId ),
121122 resource .TestCheckResourceAttr (resourceName , "defined_tags.%" , "1" ),
122123 resource .TestCheckResourceAttr (resourceName , "display_name" , "displayName" ),
123- resource .TestCheckResourceAttr (resourceName , "domain" , "example.com" ),
124+ resource .TestCheckResourceAttr (resourceName , "domain" , domainName ),
124125 resource .TestCheckResourceAttr (resourceName , "freeform_tags.%" , "1" ),
125126 resource .TestCheckResourceAttr (resourceName , "response_code" , "301" ),
126127 resource .TestCheckResourceAttr (resourceName , "target.#" , "1" ),
@@ -153,7 +154,7 @@ func TestWaasHttpRedirectResource_basic(t *testing.T) {
153154 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentIdU ),
154155 resource .TestCheckResourceAttr (resourceName , "defined_tags.%" , "1" ),
155156 resource .TestCheckResourceAttr (resourceName , "display_name" , "displayName" ),
156- resource .TestCheckResourceAttr (resourceName , "domain" , "example.com" ),
157+ resource .TestCheckResourceAttr (resourceName , "domain" , domainName ),
157158 resource .TestCheckResourceAttr (resourceName , "freeform_tags.%" , "1" ),
158159 resource .TestCheckResourceAttr (resourceName , "response_code" , "301" ),
159160 resource .TestCheckResourceAttr (resourceName , "target.#" , "1" ),
@@ -181,7 +182,7 @@ func TestWaasHttpRedirectResource_basic(t *testing.T) {
181182 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentId ),
182183 resource .TestCheckResourceAttr (resourceName , "defined_tags.%" , "1" ),
183184 resource .TestCheckResourceAttr (resourceName , "display_name" , "displayName2" ),
184- resource .TestCheckResourceAttr (resourceName , "domain" , "example.com" ),
185+ resource .TestCheckResourceAttr (resourceName , "domain" , domainName ),
185186 resource .TestCheckResourceAttr (resourceName , "freeform_tags.%" , "1" ),
186187 resource .TestCheckResourceAttr (resourceName , "response_code" , "302" ),
187188 resource .TestCheckResourceAttr (resourceName , "target.#" , "1" ),
@@ -218,7 +219,7 @@ func TestWaasHttpRedirectResource_basic(t *testing.T) {
218219 resource .TestCheckResourceAttr (datasourceName , "http_redirects.0.compartment_id" , compartmentId ),
219220 resource .TestCheckResourceAttr (datasourceName , "http_redirects.0.defined_tags.%" , "1" ),
220221 resource .TestCheckResourceAttr (datasourceName , "http_redirects.0.display_name" , "displayName2" ),
221- resource .TestCheckResourceAttr (datasourceName , "http_redirects.0.domain" , "example.com" ),
222+ resource .TestCheckResourceAttr (datasourceName , "http_redirects.0.domain" , domainName ),
222223 resource .TestCheckResourceAttr (datasourceName , "http_redirects.0.freeform_tags.%" , "1" ),
223224 resource .TestCheckResourceAttrSet (datasourceName , "http_redirects.0.id" ),
224225 resource .TestCheckResourceAttr (datasourceName , "http_redirects.0.response_code" , "302" ),
@@ -243,7 +244,7 @@ func TestWaasHttpRedirectResource_basic(t *testing.T) {
243244 resource .TestCheckResourceAttr (singularDatasourceName , "compartment_id" , compartmentId ),
244245 resource .TestCheckResourceAttr (singularDatasourceName , "defined_tags.%" , "1" ),
245246 resource .TestCheckResourceAttr (singularDatasourceName , "display_name" , "displayName2" ),
246- resource .TestCheckResourceAttr (singularDatasourceName , "domain" , "example.com" ),
247+ resource .TestCheckResourceAttr (singularDatasourceName , "domain" , domainName ),
247248 resource .TestCheckResourceAttr (singularDatasourceName , "freeform_tags.%" , "1" ),
248249 resource .TestCheckResourceAttrSet (singularDatasourceName , "id" ),
249250 resource .TestCheckResourceAttr (singularDatasourceName , "response_code" , "302" ),
0 commit comments