Skip to content

Commit

Permalink
added remote if statement for remote address
Browse files Browse the repository at this point in the history
  • Loading branch information
kavinbalagen committed Jul 1, 2024
1 parent d31972b commit a65bd94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ func TestAccResourceHardPhoneStandalone(t *testing.T) {
}

func TestAccResourcePhoneStandaloneRemoteStation(t *testing.T) {
lineAddresses := "+12005538114"
remoteStationAddress := "+11005538114"
lineAddresses := "+12005538654"
remoteStationAddress := "+11005538454"
didPoolResource1 := "test-didpool1"
phoneRes := "phone_standalone1234"
name1 := "test-phone-Kstandalone_" + uuid.NewString()
Expand All @@ -451,7 +451,7 @@ func TestAccResourcePhoneStandaloneRemoteStation(t *testing.T) {

locationRes := "test-location-K"

emergencyNumber := "+13173114114"
emergencyNumber := "+13173114334"
if err := edgeSite.DeleteLocationWithNumber(emergencyNumber, sdkConfig); err != nil {
t.Skipf("failed to delete location with number %s: %v", emergencyNumber, err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,15 @@ func createStandalonePhoneLines(lineProperties []interface{}, linesPtr *[]platfo
"instance": lineAddress,
},
},
"station_remote_address": &map[string]interface{}{
}
if len(remoteAddress) > 0 {
remoteAddress := &map[string]interface{}{
"value": &map[string]interface{}{
"instance": remoteAddress,
},
},
}
properties["station_remote_address"] = remoteAddress

}
lines = append(lines, platformclientv2.Line{
Name: &lineName,
Expand Down

0 comments on commit a65bd94

Please sign in to comment.