Last active
July 25, 2023 17:50
-
-
Save jorgemoralespou/ab8f598822ba00b58e1d903cfe5e9891 to your computer and use it in GitHub Desktop.
ytt tests
This file contains hidden or 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
#@ load("@ytt:data","data") | |
#@ load("@ytt:yaml","yaml") | |
#@ load("@ytt:struct","struct") | |
--- | |
#@ tests = [] | |
#@ test_defintions = data.read("/tests.yaml") | |
#@ for i in test_defintions.split("---"): | |
#@ value = struct.encode(yaml.decode(i)) | |
#@ if type(value) != "NoneType": | |
#@ tests.append(value["metadata"]["name"]) | |
#@ end | |
#@ end | |
tests: #@ tests |
This file contains hidden or 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
--- | |
kind: Test | |
metadata: | |
name: test-1 | |
--- | |
kind: Test | |
metadata: | |
name: test-2 | |
--- | |
kind: Test | |
metadata: | |
name: test-3 | |
--- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment