Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(test): Add ECS CreateServerGroupTests for task definition input #4957

Merged
merged 2 commits into from
Sep 30, 2020

Conversation

paragbhingre
Copy link
Contributor

This PR contains integration tests for Create Server Group Operation for the task definition type as input.

There are total 2 tests:

  1. Create server group operation for the task definition type as input, launch type as FARGATE with legacy target group.
  2. Create server group operation for the task definition type as input, launch type as FARGATE with new target group.

Related to : Clouddriver integration test

@spinnakerbot
Copy link
Contributor

The following commits need their title changed:

  • 26d3ae5: CreateServerGroupTests for task definition input

Please format your commit title into the form:

<type>(<scope>): <subject>, e.g. fix(kubernetes): address NPE in status check

This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here.

@allisaurus allisaurus self-requested a review September 29, 2020 20:35
@Test
public void createSGOWithInputsFargateLegacyTargetGroupTest() throws IOException {
/**
* TODO (pbhingre): Ideally this test would go further and actually assert that the resulting
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of copying this comment from the first test everywhere how about we just move the original comment to the top of this class, since it applies to all of these test cases at the moment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

*/

// given
String url = getTestUrl("/ecs/ops/createServerGroup");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we're using this same path in every createServerGroup test, let's extract it as a class-level var and use that instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

String url = getTestUrl("/ecs/ops/createServerGroup");
String requestBody =
generateStringFromTestFile(
"/createServerGroupOperation-inputs-fargate-NewTargetGroup.json");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: let's name this file after the new field (and lower case the word to keep consistent):
"createServerGroupOperation-inputs-fargate-targetGroupMappings.json"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the file name to "createServerGroupOperation-inputs-fargate-targetGroupMappings.json"

"targetGroup" : "spin-fargate-instanceTG"
}
],
"source" : {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if we don't include this source arg, does it fail?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source is not required. It was added as a next part of the testing but not really required for this test.

@allisaurus
Copy link
Contributor

allisaurus commented Sep 29, 2020

@paragbhingre since this has a feat(test) prefix, can we add "ECS" to the commit msg somewhere to indicate its provider affiliation? E.G., "feat(test): Add ECS CreateServerGroup integ tests for task definition input"

@paragbhingre paragbhingre changed the title feat(test): CreateServerGroupTests for task definition input feat(test): Add ECS CreateServerGroupTests for task definition input Sep 30, 2020
@allisaurus allisaurus added the ready to merge Approved and ready for a merge label Sep 30, 2020
@mergify mergify bot added the auto merged Merged automatically by a bot label Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Approved and ready for a merge target-release/1.23
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants