-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
308706a
commit 739c824
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
suite: Test namespace with default values | ||
templates: | ||
- templates/core/namespaces.yaml | ||
release: | ||
name: release-test | ||
tests: | ||
- it: should output nothing by default | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
|
||
- it: should output namespaces when defined as list | ||
set: | ||
global: | ||
pattern: test | ||
clusterGroup: | ||
name: hub | ||
namespaces: | ||
- foo | ||
- bar | ||
- baz | ||
asserts: | ||
- isKind: | ||
of: Namespace | ||
- hasDocuments: | ||
count: 3 | ||
- documentSelector: | ||
path: metadata.name | ||
value: bar | ||
equal: | ||
path: metadata.labels["argocd.argoproj.io/managed-by"] | ||
value: test-hub | ||
|
||
- it: should output namespaces when defined as map | ||
set: | ||
global: | ||
pattern: test | ||
clusterGroup: | ||
name: hub | ||
namespaces: | ||
namespace1: | ||
open-cluster-management: | ||
labels: | ||
openshift.io/node-selector: "" | ||
kubernetes.io/os: linux | ||
annotations: | ||
openshift.io/cluster-monitoring: "true" | ||
owner: "namespace owner" | ||
asserts: | ||
- isKind: | ||
of: Namespace | ||
- hasDocuments: | ||
count: 2 | ||
- documentSelector: | ||
path: metadata.name | ||
value: open-cluster-management | ||
equal: | ||
path: metadata.annotations["openshift.io/cluster-monitoring"] | ||
value: "true" |