Git Product home page Git Product logo

Comments (1)

jasoncoffman avatar jasoncoffman commented on August 16, 2024

Name of Tester: Jason Coffman (@jasoncoffman)
Date of Test: 26 August 2020
Title of Test: Test Partial Activation for Spinnaker Accounts - EC2

Spinnaker Version: 1.21.4
Plugin Version: 0.0.1

Status: PASS

Step 1

Create Spinnaker Account for EC2, ECS, and Lambda by creating a response.json file with the below content to be served via the Golang test server

{
  "SpinnakerAccounts": [
    {
      "AccountId": "111122223333",
      "SpinnakerAccountName": "isengard-2",
      "Regions": [
        "us-west-2"
      ],
      "SpinnakerStatus": "ACTIVE",
      "SpinnakerAssumeRole": "role/spinnakerManaged",
      "SpinnakerProviders": [
        "ec2", "ecs", "lambda"
      ],
      "SpinnakerId": "spinnaker1",
      "CreatedAt": "1598026448909989587",
      "UpdatedAt": "1598027546352397694"
    }
  ],
  "Pagination": {
    "NextUrl": ""
  }
}

Step 2

Execute curl http://localhost:7002/credentials to verify account creation

Expected:

Two accounts are created - one with type: aws and another with type: ecs

Output:
[
  {
    "accountId": "111122223333",
    "accountType": "isengard-2",
    "challengeDestructiveActions": false,
    "cloudProvider": "aws",
    "environment": "isengard-2",
    "name": "isengard-2",
    "permissions": {},
    "primaryAccount": false,
    "providerVersion": "v1",
    "requiredGroupMembership": [],
    "type": "aws"
  },
  {
    "accountId": "111122223333",
    "accountType": "ecs",
    "challengeDestructiveActions": false,
    "cloudProvider": "ecs",
    "environment": "isengard-2",
    "name": "isengard-2-ecs",
    "permissions": {},
    "primaryAccount": false,
    "providerVersion": "v1",
    "requiredGroupMembership": [],
    "type": "ecs"
  }
]

Step 3

Edit Spinnaker Account and remove all Spinnaker accounts by editing the response.json file with the below content to be served via the Golang test server

{
  "SpinnakerAccounts": [
    {
      "AccountId": "111122223333",
      "SpinnakerAccountName": "isengard-2",
      "Regions": [
        "us-west-2"
      ],
      "SpinnakerStatus": "ACTIVE",
      "SpinnakerAssumeRole": "role/spinnakerManaged",
      "SpinnakerProviders": [

      ],
      "SpinnakerId": "spinnaker1",
      "CreatedAt": "1598026448909989587",
      "UpdatedAt": "1598027546352397694"
    }
  ],
  "Pagination": {
    "NextUrl": ""
  }
}

Step 4

Execute curl http://localhost:7002/credentials to verify account removal

Expected

There will be no accounts listed

Output
[
]

Step 5

Edit Spinnaker Account to create an EC2 Spinnaker account by editing the response.json file with the below content to be served via the Golang test server

{
  "SpinnakerAccounts": [
    {
      "AccountId": "111122223333",
      "SpinnakerAccountName": "isengard-2",
      "Regions": [
        "us-west-2"
      ],
      "SpinnakerStatus": "ACTIVE",
      "SpinnakerAssumeRole": "role/spinnakerManaged",
      "SpinnakerProviders": [
        "ec2"
      ],
      "SpinnakerId": "spinnaker1",
      "CreatedAt": "1598026448909989587",
      "UpdatedAt": "1598027546352397694"
    }
  ],
  "Pagination": {
    "NextUrl": ""
  }
}

Step 6

Execute curl http://localhost:7002/credentials to verify account creation

Expected

There will be a single account with type: aws

Output
[
  {
    "accountId": "111122223333",
    "accountType": "isengard-2",
    "challengeDestructiveActions": false,
    "cloudProvider": "aws",
    "environment": "isengard-2",
    "name": "isengard-2",
    "permissions": {},
    "primaryAccount": false,
    "providerVersion": "v1",
    "requiredGroupMembership": [],
    "type": "aws"
  }
]

from aws-account-registration-plugin-spinnaker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.