Skip to content

Commit

Permalink
test(orion): add stable name testing
Browse files Browse the repository at this point in the history
and add __snapshot__ to permissions corrections

Signed-off-by: Kevin O'Donnell <kevin@blockchaintp.com>
  • Loading branch information
scealiontach committed Aug 30, 2021
1 parent bc6e542 commit 6e3c9a1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ charts: pkg post_correct_ownership
.PHONY: correct_ownership
correct_ownership: tool.docker
$(TOOL_RUN) -c "find /project -name dist -exec chown -R $(UID):$(GID) {} \;"
$(TOOL_RUN) -c "find /project -name __snapshot__ -exec chown -R $(UID):$(GID) {} \;"
$(TOOL_RUN) -c "find /project/$(CHART_BASE) -mindepth 2 -name charts -type d \
-exec chown -R $(UID):$(GID) {} \;"
$(TOOL_RUN) -c "find /project/$(CHART_BASE) -name requirements.lock \
Expand Down
1 change: 1 addition & 0 deletions charts/orion/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/
13 changes: 13 additions & 0 deletions charts/orion/tests/__snapshot__/stable-names_test.yaml.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
check for stable entity names (services, statefulsets, serviceaccounts):
1: |
test-orion
2: |
orion-config
3: |
test-orion
4: |
test-orion
5: |
test-orion-0
6: |
test-orion-1
15 changes: 15 additions & 0 deletions charts/orion/tests/stable-names_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
suite: test for stable names
templates:
- statefulset.yaml
- config-cm.yaml
- service.yaml
- serviceaccount.yaml
- pernode-service.yaml
release:
name: test
namespace: testns
tests:
- it: check for stable entity names (services, statefulsets, serviceaccounts)
asserts:
- matchSnapshot:
path: metadata.name

0 comments on commit 6e3c9a1

Please sign in to comment.