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

creating cowsay kuttl tests #284

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 9 additions & 0 deletions repository/cowsay/tests/cowsay-config-map/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Pod
metadata:
name: kudo-controller-manager-0
namespace: kudo-system
status:
phase: Running

# confirms that kudo is running
Copy link
Member

Choose a reason for hiding this comment

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

Why is it necessary to check this here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I also thought that this PR removed this assertion in favor of kudo init ... --wait

Copy link
Member Author

Choose a reason for hiding this comment

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

it makes the test more portal IMO... yes we should have a kudo init --wait. This fails fast if that wasn't done.. and I see these tests as something we may point users to... that may run them...

Copy link
Contributor

@zen-dog zen-dog Aug 3, 2020

Choose a reason for hiding this comment

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

I mean, we don't wait for KUDO this way for other operators tests today (because we already kudo init --wait) so I'd rather stay consistent right now and remove this. The inconsistency concern is IMO bigger than portability one.

Copy link
Member

Choose a reason for hiding this comment

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

I agree with @zen-dog here - This is testing something that should be ensured globally not in each test. If we have this here, it will be copied to other tests and we end up with having this step duplicated everywhere.

We had this in the kudo e2e tests as well, I was glad we could remove it there.

20 changes: 20 additions & 0 deletions repository/cowsay/tests/cowsay-config-map/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: kudo.dev/v1beta1
kind: Instance
metadata:
labels:
kudo.dev/operator: cowsay
name: cowsay-instance
namespace: default
status:
planStatus:
deploy:
name: deploy
phases:
- name: main
status: COMPLETE
steps:
- name: genfiles
status: COMPLETE
- name: app
status: COMPLETE
status: COMPLETE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: kubectl kudo install ../../operator
13 changes: 13 additions & 0 deletions repository/cowsay/tests/cowsay-config-map/02-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
annotations:
kudo.dev/phase: main
kudo.dev/plan: deploy
kudo.dev/step: genfiles
labels:
heritage: kudo
kudo.dev/instance: cowsay-instance
kudo.dev/operator: cowsay
name: cowsayinstance.deploy.main.genfiles.genwww.indexhtml
namespace: default