@@ -162,7 +162,7 @@ func TestEBMFeatureSetCmd(t *testing.T) {
162162 }{
163163 {
164164 name : "activate feature" ,
165- args : []string {testServerID , "--feature" , "disaggregated_public_ports" , "--state " , "activate" , "--output" , "json" },
165+ args : []string {testServerID , "--feature" , "disaggregated_public_ports" , "--command " , "activate" , "--output" , "json" },
166166 expectedOutput : testutils .ReadFixture (filepath .Join (featuresFixtureBasePath , "feature_set.json" )),
167167 configureMock : func (mock * mocks.MockHostsService ) {
168168 mock .EXPECT ().
@@ -172,7 +172,7 @@ func TestEBMFeatureSetCmd(t *testing.T) {
172172 },
173173 {
174174 name : "deactivate feature" ,
175- args : []string {testServerID , "--feature" , "disaggregated_public_ports" , "--state " , "deactivate" , "--output" , "json" },
175+ args : []string {testServerID , "--feature" , "disaggregated_public_ports" , "--command " , "deactivate" , "--output" , "json" },
176176 expectedOutput : testutils .ReadFixture (filepath .Join (featuresFixtureBasePath , "feature_set.json" )),
177177 configureMock : func (mock * mocks.MockHostsService ) {
178178 mock .EXPECT ().
@@ -182,7 +182,7 @@ func TestEBMFeatureSetCmd(t *testing.T) {
182182 },
183183 {
184184 name : "activate private_ipxe_boot with ipxe-config" ,
185- args : []string {testServerID , "--feature" , "private_ipxe_boot" , "--state " , "activate" , "--ipxe-config" , "#!ipxe\n chain http://boot.example.com" , "--output" , "json" },
185+ args : []string {testServerID , "--feature" , "private_ipxe_boot" , "--command " , "activate" , "--ipxe-config" , "#!ipxe\n chain http://boot.example.com" , "--output" , "json" },
186186 expectedOutput : testutils .ReadFixture (filepath .Join (featuresFixtureBasePath , "feature_set_private_ipxe_boot.json" )),
187187 configureMock : func (mock * mocks.MockHostsService ) {
188188 mock .EXPECT ().
@@ -194,7 +194,7 @@ func TestEBMFeatureSetCmd(t *testing.T) {
194194 },
195195 {
196196 name : "deactivate private_ipxe_boot" ,
197- args : []string {testServerID , "--feature" , "private_ipxe_boot" , "--state " , "deactivate" , "--output" , "json" },
197+ args : []string {testServerID , "--feature" , "private_ipxe_boot" , "--command " , "deactivate" , "--output" , "json" },
198198 expectedOutput : testutils .ReadFixture (filepath .Join (featuresFixtureBasePath , "feature_set_private_ipxe_boot.json" )),
199199 configureMock : func (mock * mocks.MockHostsService ) {
200200 mock .EXPECT ().
@@ -204,7 +204,7 @@ func TestEBMFeatureSetCmd(t *testing.T) {
204204 },
205205 {
206206 name : "activate host_rescue_mode with password auth" ,
207- args : []string {testServerID , "--feature" , "host_rescue_mode" , "--state " , "activate" , "--auth-method" , "password" , "--output" , "json" },
207+ args : []string {testServerID , "--feature" , "host_rescue_mode" , "--command " , "activate" , "--auth-method" , "password" , "--output" , "json" },
208208 expectedOutput : testutils .ReadFixture (filepath .Join (featuresFixtureBasePath , "feature_set_host_rescue_mode.json" )),
209209 configureMock : func (mock * mocks.MockHostsService ) {
210210 mock .EXPECT ().
@@ -216,7 +216,7 @@ func TestEBMFeatureSetCmd(t *testing.T) {
216216 },
217217 {
218218 name : "activate host_rescue_mode with ssh_key auth" ,
219- args : []string {testServerID , "--feature" , "host_rescue_mode" , "--state " , "activate" , "--auth-method" , "ssh_key" , "--ssh-key-fingerprint" , "aa:bb:cc" , "--output" , "json" },
219+ args : []string {testServerID , "--feature" , "host_rescue_mode" , "--command " , "activate" , "--auth-method" , "ssh_key" , "--ssh-key-fingerprint" , "aa:bb:cc" , "--output" , "json" },
220220 expectedOutput : testutils .ReadFixture (filepath .Join (featuresFixtureBasePath , "feature_set_host_rescue_mode.json" )),
221221 configureMock : func (mock * mocks.MockHostsService ) {
222222 mock .EXPECT ().
@@ -229,7 +229,7 @@ func TestEBMFeatureSetCmd(t *testing.T) {
229229 },
230230 {
231231 name : "deactivate host_rescue_mode" ,
232- args : []string {testServerID , "--feature" , "host_rescue_mode" , "--state " , "deactivate" , "--output" , "json" },
232+ args : []string {testServerID , "--feature" , "host_rescue_mode" , "--command " , "deactivate" , "--output" , "json" },
233233 expectedOutput : testutils .ReadFixture (filepath .Join (featuresFixtureBasePath , "feature_set_host_rescue_mode.json" )),
234234 configureMock : func (mock * mocks.MockHostsService ) {
235235 mock .EXPECT ().
@@ -239,7 +239,7 @@ func TestEBMFeatureSetCmd(t *testing.T) {
239239 },
240240 {
241241 name : "api error" ,
242- args : []string {testServerID , "--feature" , "disaggregated_public_ports" , "--state " , "activate" },
242+ args : []string {testServerID , "--feature" , "disaggregated_public_ports" , "--command " , "activate" },
243243 expectError : true ,
244244 configureMock : func (mock * mocks.MockHostsService ) {
245245 mock .EXPECT ().
@@ -248,13 +248,13 @@ func TestEBMFeatureSetCmd(t *testing.T) {
248248 },
249249 },
250250 {
251- name : "invalid state " ,
252- args : []string {testServerID , "--feature" , "disaggregated_public_ports" , "--state " , "invalid" },
251+ name : "invalid command " ,
252+ args : []string {testServerID , "--feature" , "disaggregated_public_ports" , "--command " , "invalid" },
253253 expectError : true ,
254254 },
255255 {
256256 name : "unsupported feature" ,
257- args : []string {testServerID , "--feature" , "unknown_feature" , "--state " , "activate" },
257+ args : []string {testServerID , "--feature" , "unknown_feature" , "--command " , "activate" },
258258 expectError : true ,
259259 },
260260 }
0 commit comments