@@ -69,6 +69,37 @@ func TestAccToolsMacServerWinBoxTest_basic(t *testing.T) {
69
69
}
70
70
}
71
71
72
+ const testToolsMacServerPing = "routeros_tool_mac_server_ping.test"
73
+
74
+ func TestAccToolsMacServerPingTest_basic (t * testing.T ) {
75
+ for _ , name := range testNames {
76
+ t .Run (name , func (t * testing.T ) {
77
+ resource .Test (t , resource.TestCase {
78
+ PreCheck : func () {
79
+ testAccPreCheck (t )
80
+ testSetTransportEnv (t , name )
81
+ },
82
+ ProviderFactories : testAccProviderFactories ,
83
+ Steps : []resource.TestStep {
84
+ {
85
+ Config : testAccToolsMacServerPingConfig (true ),
86
+ Check : resource .ComposeTestCheckFunc (
87
+ testResourcePrimaryInstanceId (testToolsMacServerPing ),
88
+ resource .TestCheckResourceAttr (testToolsMacServerPing , "enabled" , "yes" ),
89
+ ),
90
+ },
91
+ {
92
+ Config : testAccToolsMacServerPingConfig (false ),
93
+ Check : resource .ComposeTestCheckFunc (
94
+ resource .TestCheckResourceAttr (testToolsMacServerPing , "enabled" , "no" ),
95
+ ),
96
+ },
97
+ },
98
+ })
99
+ })
100
+ }
101
+ }
102
+
72
103
func testAccToolsMacServerConfig (acl string ) string {
73
104
return fmt .Sprintf (`%v
74
105
@@ -86,3 +117,12 @@ resource "routeros_tool_mac_server_winbox" "test" {
86
117
}
87
118
` , providerConfig , acl )
88
119
}
120
+
121
+ func testAccToolsMacServerPingConfig (enabled bool ) string {
122
+ return fmt .Sprintf (`%v
123
+
124
+ resource "routeros_tool_mac_server_ping" "test" {
125
+ enabled = %v
126
+ }
127
+ ` , providerConfig , enabled )
128
+ }
0 commit comments