Skip to content

Commit

Permalink
Fix wireless profile test values
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Mar 28, 2024
1 parent 797a507 commit 12312df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion gen/definitions/wireless_profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ attributes:
id: true
description: Ssid Name
example: mySSID1
test_value: catalystcenter_wireless_enterprise_ssid.test.name
- model_name: enableFabric
type: Bool
description: "`true` if ssid is fabric else `false`"
Expand Down Expand Up @@ -64,7 +65,7 @@ attributes:
exclude_test: true
example: mySSID1_profile
test_prerequisites: |
resource "catalystcenter_wireless_enterprise_ssid" "example" {
resource "catalystcenter_wireless_enterprise_ssid" "test" {
name = "mySSID1"
security_level = "wpa3_enterprise"
passphrase = "Cisco123"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
func TestAccCcWirelessProfile(t *testing.T) {
var checks []resource.TestCheckFunc
checks = append(checks, resource.TestCheckResourceAttr("catalystcenter_wireless_profile.test", "name", "Wireless_Profile_1"))
checks = append(checks, resource.TestCheckResourceAttr("catalystcenter_wireless_profile.test", "ssid_details.0.name", "mySSID1"))
checks = append(checks, resource.TestCheckResourceAttr("catalystcenter_wireless_profile.test", "ssid_details.0.enable_fabric", "true"))
checks = append(checks, resource.TestCheckResourceAttr("catalystcenter_wireless_profile.test", "ssid_details.0.enable_flex_connect", "false"))

Expand All @@ -57,7 +56,7 @@ func TestAccCcWirelessProfile(t *testing.T) {

// Section below is generated&owned by "gen/generator.go". //template:begin testPrerequisites
const testAccCcWirelessProfilePrerequisitesConfig = `
resource "catalystcenter_wireless_enterprise_ssid" "example" {
resource "catalystcenter_wireless_enterprise_ssid" "test" {
name = "mySSID1"
security_level = "wpa3_enterprise"
passphrase = "Cisco123"
Expand All @@ -82,7 +81,7 @@ func testAccCcWirelessProfileConfig_all() string {
config := `resource "catalystcenter_wireless_profile" "test" {` + "\n"
config += ` name = "Wireless_Profile_1"` + "\n"
config += ` ssid_details = [{` + "\n"
config += ` name = "mySSID1"` + "\n"
config += ` name = catalystcenter_wireless_enterprise_ssid.test.name` + "\n"
config += ` enable_fabric = true` + "\n"
config += ` enable_flex_connect = false` + "\n"
config += ` }]` + "\n"
Expand Down

0 comments on commit 12312df

Please sign in to comment.