-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
The following commits need their title changed:
Please format your commit title into the form:
This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here. |
@Test | ||
public void createSGOWithInputsFargateLegacyTargetGroupTest() throws IOException { | ||
/** | ||
* TODO (pbhingre): Ideally this test would go further and actually assert that the resulting |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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" : { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
@paragbhingre since this has a |
673cd5c
to
02bd808
Compare
...s/src/integration/java/com/netflix/spinnaker/clouddriver/ecs/test/CreateServerGroupSpec.java
Outdated
Show resolved
Hide resolved
a6cddab
to
abca3d1
Compare
This PR contains integration tests for Create Server Group Operation for the task definition type as input.
There are total 2 tests:
Related to : Clouddriver integration test