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

Add replicaset helper functions #804

Merged
merged 1 commit into from
Mar 17, 2021
Merged

Conversation

cbuto
Copy link
Contributor

@cbuto cbuto commented Mar 10, 2021

Closes #793.

Thanks ahead of time for reviewing!

Update test names

Fix names

Update test YAML

Update label
Copy link
Contributor

@yorinasub17 yorinasub17 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! LGTM other than the one nit about when to defer. I think we can merge this in once that is addressed!

Separately, I kicked off a build so we get one test cycle in the meantime.

options := NewKubectlOptions("", "", uniqueID)
configData := fmt.Sprintf(EXAMPLE_REPLICASET_YAML_TEMPLATE, uniqueID, uniqueID)
KubectlApplyFromString(t, options, configData)
defer KubectlDeleteFromString(t, options, configData)
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: the delete defer should be before the apply, so that it always runs even if the apply fails with error (which could partially deploy things).

Copy link
Contributor

@yorinasub17 yorinasub17 left a comment

Choose a reason for hiding this comment

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

FYI The kubernetes tests passed. Since the tests passed, and the issue mentioned above is very minor, I'll go ahead and merge this in (but would appreciate if you can address the above comment in a follow up PR!).

@cbuto
Copy link
Contributor Author

cbuto commented Mar 17, 2021

FYI The kubernetes tests passed. Since the tests passed, and the issue mentioned above is very minor, I'll go ahead and merge this in (but would appreciate if you can address the above comment in a follow up PR!).

Awesome thanks! I'll put up PR for that fix here in a second

This was referenced Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Helper functions for Kubernetes ReplicaSets
2 participants