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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions test/integration/first-operator-test/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: first-operator-nginx-deployment
spec:
replicas: 2
template:
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
4 changes: 4 additions & 0 deletions test/integration/first-operator-test/00-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kudo.dev/v1alpha1
kind: TestStep
kubectl:
- kudo install --instance first-operator ../../../config/samples/first-operator
6 changes: 6 additions & 0 deletions test/integration/first-operator-test/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: first-operator-nginx-deployment
spec:
replicas: 4
6 changes: 6 additions & 0 deletions test/integration/first-operator-test/01-scale.yaml
Original file line number Diff line number Diff line change
@@ -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...

kind: Deployment
metadata:
name: first-operator-nginx-deployment
spec:
replicas: 4