-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add some unit tests. These are more succinct and much faster than the terratest tests.
- Loading branch information
1 parent
a33b8c1
commit 4d90e8a
Showing
3 changed files
with
63 additions
and
1 deletion.
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
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 |
---|---|---|
|
@@ -20,3 +20,4 @@ | |
.idea/ | ||
*.tmproj | ||
.vscode/ | ||
tests/ |
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,54 @@ | ||
suite: test server deployment | ||
templates: | ||
- server-deployment.yaml | ||
- server-configmap.yaml | ||
set: | ||
server: | ||
replicaCount: 2 | ||
resources: | ||
requests: | ||
cpu: 100m | ||
frontend: | ||
replicaCount: 3 | ||
resources: | ||
requests: | ||
cpu: 200m | ||
tests: | ||
- it: defaults to service wide replica count | ||
template: templates/server-deployment.yaml | ||
documentSelector: | ||
path: '$[?(@.metadata.name != "RELEASE-NAME-temporal-frontend")].kind' | ||
value: Deployment | ||
matchMany: true | ||
asserts: | ||
- equal: | ||
path: spec.replicas | ||
value: 2 | ||
- it: favours service specific replica count | ||
template: templates/server-deployment.yaml | ||
documentSelector: | ||
path: metadata.name | ||
value: RELEASE-NAME-temporal-frontend | ||
asserts: | ||
- equal: | ||
path: spec.replicas | ||
value: 3 | ||
- it: defaults to service wide resources | ||
template: templates/server-deployment.yaml | ||
documentSelector: | ||
path: '$[?(@.metadata.name != "RELEASE-NAME-temporal-frontend")].kind' | ||
value: Deployment | ||
matchMany: true | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.containers[0].resources.requests.cpu | ||
value: 100m | ||
- it: favours service specific resources | ||
template: templates/server-deployment.yaml | ||
documentSelector: | ||
path: metadata.name | ||
value: RELEASE-NAME-temporal-frontend | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.containers[0].resources.requests.cpu | ||
value: 200m |