Skip to content

Commit

Permalink
more defaults refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbauerinc committed Aug 1, 2024
1 parent a1afd51 commit dea2c52
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ func (r *FQDNConnectionResource) Schema(ctx context.Context, req resource.Schema
Description: "Webhook event URL",
Optional: true,
Computed: true,
Default: stringdefault.StaticString("https://www.example.com/hooks"),
Default: stringdefault.StaticString(""),
},
"webhook_event_failover_url": schema.StringAttribute{
Description: "Webhook event failover URL",
Optional: true,
Computed: true,
Default: stringdefault.StaticString("https://failover.example.com/hooks"),
Default: stringdefault.StaticString(""),
},
"webhook_api_version": schema.StringAttribute{
Description: "Webhook API version",
Expand Down
22 changes: 11 additions & 11 deletions provider/provider/internal/provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ resource "telnyx_outbound_voice_profile" "test" {
resource "telnyx_messaging_profile" "test" {
name = "Test Messaging Profile Terraform"
enabled = true
webhook_url = "https://example.com/webhook"
webhook_url = ""
webhook_api_version = "2"
}
resource "telnyx_credential_connection" "test" {
connection_name = "Test Credential Connection Terraform"
username = "test12345terraform"
password = "test12345terraform"
webhook_event_url = "https://www.example.com/hooks"
webhook_event_failover_url = "https://failover.example.com/hooks"
webhook_event_url = ""
webhook_event_failover_url = ""
webhook_api_version = "2"
inbound = {
codecs = ["G722", "G711U", "G711A", "G729", "OPUS", "H.264"]
Expand Down Expand Up @@ -105,7 +105,7 @@ resource "telnyx_fqdn" "test" {
resource "telnyx_texml_application" "test" {
friendly_name = "Test TeXML Application Terraform"
voice_url = "https://example.com/voice"
voice_fallback_url = "https://example.com/failover"
voice_fallback_url = ""
voice_method = "post"
inbound = {
codecs = ["G722", "G711U", "G711A", "G729", "OPUS", "H.264"]
Expand Down Expand Up @@ -134,7 +134,7 @@ resource "telnyx_phone_number_lookup" "test" {
resource.TestCheckResourceAttr("telnyx_fqdn.test", "port", "5060"),
resource.TestCheckResourceAttr("telnyx_texml_application.test", "friendly_name", "Test TeXML Application Terraform"),
resource.TestCheckResourceAttr("telnyx_texml_application.test", "voice_url", "https://example.com/voice"),
resource.TestCheckResourceAttr("telnyx_texml_application.test", "voice_fallback_url", "https://example.com/failover"),
resource.TestCheckResourceAttr("telnyx_texml_application.test", "voice_fallback_url", ""),
resource.TestCheckResourceAttr("telnyx_texml_application.test", "voice_method", "post"),
),
},
Expand Down Expand Up @@ -162,16 +162,16 @@ resource "telnyx_outbound_voice_profile" "test" {
resource "telnyx_messaging_profile" "test" {
name = "Updated Test Messaging Profile Terraform"
enabled = true
webhook_url = "https://example.com/webhook"
webhook_url = ""
webhook_api_version = "2"
}
resource "telnyx_credential_connection" "test" {
connection_name = "Updated Test Credential Connection Terraform"
username = "test12345terraform"
password = "test12345terraform"
webhook_event_url = "https://www.example.com/hooks"
webhook_event_failover_url = "https://failover.example.com/hooks"
webhook_event_url = ""
webhook_event_failover_url = ""
webhook_api_version = "2"
inbound = {
codecs = ["G722", "G711U", "G711A", "G729", "OPUS", "H.264"]
Expand Down Expand Up @@ -212,7 +212,7 @@ resource "telnyx_fqdn" "test" {
resource "telnyx_texml_application" "test" {
friendly_name = "Updated Test TeXML Application Terraform"
voice_url = "https://example.com/voice"
voice_fallback_url = "https://example.com/failover"
voice_fallback_url = ""
voice_method = "post"
inbound = {
codecs = ["G722", "G711U", "G711A", "G729", "OPUS", "H.264"]
Expand All @@ -226,7 +226,7 @@ resource "telnyx_texml_application" "test" {
resource "telnyx_texml_application" "test2" {
friendly_name = "2 Test TeXML Application Terraform"
voice_url = "https://example.com/voice"
voice_fallback_url = "https://example.com/failover"
voice_fallback_url = ""
voice_method = "post"
inbound = {
codecs = ["G722", "G711U", "G711A", "G729", "OPUS", "H.264"]
Expand Down Expand Up @@ -255,7 +255,7 @@ resource "telnyx_phone_number_lookup" "test" {
resource.TestCheckResourceAttr("telnyx_fqdn.test", "port", "5060"),
resource.TestCheckResourceAttr("telnyx_texml_application.test", "friendly_name", "Updated Test TeXML Application Terraform"),
resource.TestCheckResourceAttr("telnyx_texml_application.test", "voice_url", "https://example.com/voice"),
resource.TestCheckResourceAttr("telnyx_texml_application.test", "voice_fallback_url", "https://example.com/failover"),
resource.TestCheckResourceAttr("telnyx_texml_application.test", "voice_fallback_url", ""),
resource.TestCheckResourceAttr("telnyx_texml_application.test", "voice_method", "post"),
),
},
Expand Down

0 comments on commit dea2c52

Please sign in to comment.