From 2a50045bb954a060c2f1f5fd6a2ab013cf3f579b Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Thu, 3 Oct 2024 07:55:02 -0700 Subject: [PATCH] test(e2e): delete launch configuration tests (#6540) --- features/autoscaling/autoscaling.feature | 30 ----------------- .../step_definitions/autoscaling.js | 32 ------------------- 2 files changed, 62 deletions(-) delete mode 100644 features/autoscaling/autoscaling.feature delete mode 100644 features/autoscaling/step_definitions/autoscaling.js diff --git a/features/autoscaling/autoscaling.feature b/features/autoscaling/autoscaling.feature deleted file mode 100644 index 02cabc6020e5..000000000000 --- a/features/autoscaling/autoscaling.feature +++ /dev/null @@ -1,30 +0,0 @@ -# language: en -@autoscaling -Feature: Auto Scaling - - I want to use Auto Scaling - - Scenario: Managing auto scaling groups - Given I create a launch configuration with name "launch-config-integ" - And I describe launch configurations - Then the list should contain the launch configuration "launch-config-integ" - And I delete the launch configuration "launch-config-integ" - -# @pagination -# Scenario: Paginating responses -# Given I create a launch configuration with name "launch-config-integ-1" -# And I create a launch configuration with name "launch-config-integ-2" -# And I paginate the "describeLaunchConfigurations" operation with limit 1 -# Then I should get more than one page -# And I should get numPages - 1 markers -# And the last page should not contain a marker -# And I delete the launch configuration "launch-config-integ-1" -# And I delete the launch configuration "launch-config-integ-2" - - Scenario: Error handling - Given I create a launch configuration with name "" - Then the error code should be "ValidationError" - And the error message should contain: - """ - Member must have length greater than or equal to 1 - """ diff --git a/features/autoscaling/step_definitions/autoscaling.js b/features/autoscaling/step_definitions/autoscaling.js deleted file mode 100644 index b28af9d503e9..000000000000 --- a/features/autoscaling/step_definitions/autoscaling.js +++ /dev/null @@ -1,32 +0,0 @@ -const { Before, Given, Then } = require("@cucumber/cucumber"); - -Before({ tags: "@autoscaling" }, function (scenario, callback) { - const { AutoScaling } = require("../../../clients/client-auto-scaling"); - this.service = new AutoScaling({ region: "us-east-1" }); - callback(); -}); - -Given("I create a launch configuration with name {string}", function (name, callback) { - const params = { - ImageId: "ami-1624987f", - InstanceType: "m1.small", - LaunchConfigurationName: name, - }; - this.request(null, "createLaunchConfiguration", params, callback, false); -}); - -Given("I describe launch configurations", function (callback) { - this.request(null, "describeLaunchConfigurations", {}, callback); -}); - -Then("the list should contain the launch configuration {string}", function (name, callback) { - this.assert.contains(this.data.LaunchConfigurations, function (configuration) { - return configuration.LaunchConfigurationName === name; - }); - callback(); -}); - -Then("I delete the launch configuration {string}", function (name, callback) { - const params = { LaunchConfigurationName: name }; - this.request(null, "deleteLaunchConfiguration", params, callback); -});