@@ -7,6 +7,24 @@ import (
7
7
"testing"
8
8
)
9
9
10
+ func TestAccSourceLocationResourceMinimal (t * testing.T ) {
11
+ resourceName := "awsmt_source_location.test_source_location"
12
+ name := "minimalSourceLocation"
13
+ resource .Test (t , resource.TestCase {
14
+ PreCheck : func () { testAccPreCheck (t ) },
15
+ ProtoV6ProviderFactories : testAccProtoV6ProviderFactories ,
16
+ Steps : []resource.TestStep {
17
+ {
18
+ Config : minimalSourceLocation (name ),
19
+ Check : resource .ComposeAggregateTestCheckFunc (
20
+ resource .TestCheckResourceAttr (resourceName , "id" , name ),
21
+ resource .TestCheckResourceAttr (resourceName , "default_segment_delivery_configuration.base_url" , "https://ott-mediatailor-test.s3.eu-central-1.amazonaws.com" ),
22
+ ),
23
+ },
24
+ },
25
+ })
26
+ }
27
+
10
28
func TestAccSourceLocationResourceBasic (t * testing.T ) {
11
29
resourceName := "awsmt_source_location.test_source_location"
12
30
name := "test_source_location"
@@ -130,6 +148,24 @@ func TestAccSourceLocationDeleteVodResource(t *testing.T) {
130
148
})
131
149
}
132
150
151
+ func minimalSourceLocation (name string ) string {
152
+ return fmt .Sprintf (`
153
+ resource "awsmt_source_location" "test_source_location"{
154
+ name = "%[1]s"
155
+ http_configuration = {
156
+ base_url = "https://ott-mediatailor-test.s3.eu-central-1.amazonaws.com"
157
+ }
158
+ }
159
+ data "awsmt_source_location" "read" {
160
+ name = awsmt_source_location.test_source_location.name
161
+ }
162
+ output "awsmt_source_location" {
163
+ value = data.awsmt_source_location.read
164
+ }
165
+ ` , name )
166
+
167
+ }
168
+
133
169
func basicSourceLocation (name , baseUrl , k1 , v1 , k2 , v2 string ) string {
134
170
return fmt .Sprintf (`
135
171
resource "awsmt_source_location" "test_source_location"{
0 commit comments