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 an integration test for the 'first-operator' example #828

Merged
merged 4 commits into from
Sep 18, 2019

Conversation

nfnt
Copy link
Member

@nfnt nfnt commented Sep 16, 2019

What type of PR is this?
/kind enhancement
/kind test

What this PR does / why we need it:
This ensures that changes in KUDO are reflected in this example.

Which issue(s) this PR fixes:

Fixes #827

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

This ensures that changes in KUDO are reflected in this example.
Copy link
Contributor

@alenkacz alenkacz left a comment

Choose a reason for hiding this comment

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

Nice 👏

Copy link
Member

@kensipe kensipe left a comment

Choose a reason for hiding this comment

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

/lgtm

@@ -0,0 +1,6 @@
apiVersion: apps/v1

Choose a reason for hiding this comment

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

Is the correct way to scale to update the deployment replicas directly?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

The example shows how to adjust the replicas on a deployment when testing a deployment. You aren’t testing a deployment so would be writing a different test than the example...

Copy link
Contributor

@alenkacz alenkacz left a comment

Choose a reason for hiding this comment

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

Oooh, Justin is 100% right, I think this test should adjust the replicas parameter value instead. Good catch @jbarrick-mesosphere !

@nfnt
Copy link
Member Author

nfnt commented Sep 17, 2019

So what do I have to do instead? Is the test documentation not up-to-date and needs to be changed?

@nfnt
Copy link
Member Author

nfnt commented Sep 17, 2019

I'm now scaling like it's done in operator-test.

@nfnt nfnt force-pushed the nfnt/test-first-operator-example branch from 5e4f049 to 2a013a9 Compare September 17, 2019 08:25
@nfnt nfnt requested a review from alenkacz September 17, 2019 08:39
Copy link
Contributor

@alenkacz alenkacz left a comment

Choose a reason for hiding this comment

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

Thanks! I am fine with this test not scaling at all as well - I think one scale test is enough to catch a regression but 👍

@nfnt nfnt merged commit ad6f10c into master Sep 18, 2019
@nfnt nfnt deleted the nfnt/test-first-operator-example branch September 18, 2019 07:25
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.

Verify that samples are working by adding integration tests for them
6 participants