Skip to content

Commit

Permalink
test: playback config update failure
Browse files Browse the repository at this point in the history
OTT-6255
  • Loading branch information
thatsddr committed Jul 22, 2024
1 parent 7bce684 commit a52b907
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions awsmt/resource_playback_configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,32 @@ func TestAccPlaybackConfigurationCreationFail(t *testing.T) {
})
}

func TestAccPlaybackConfigurationUpdateFail(t *testing.T) {
resourceName := "awsmt_playback_configuration.r2"
name := "test-acc-playback-configuration-delete"
adUrl := "https://www.buzz.com"
adUrl2 := "invalid"
videoSourceUrl := "https://www.bar.at"
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
{
Config: minimalPlaybackConfiguration(name, adUrl, videoSourceUrl),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr(resourceName, "id", name),
resource.TestCheckResourceAttr(resourceName, "name", name),
resource.TestCheckResourceAttr(resourceName, "ad_decision_server_url", adUrl),
),
},
{
Config: minimalPlaybackConfiguration(name, adUrl2, videoSourceUrl),
ExpectError: regexp.MustCompile(`.*AdDecisionServerUrl requires a valid URL.*`),
},
},
})
}

func TestAccPlaybackConfigurationResource(t *testing.T) {
name := "example-playback-configuration-awsmt"
adUrl := "https://exampleurl.com/"
Expand Down

0 comments on commit a52b907

Please sign in to comment.