File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,3 +40,9 @@ applications:
4040 HYPHENATED_STRING : " - strings that start with a hyphen should be quoted"
4141 JSON_AS_STRING : ' { jre: { version: 11.+ }, memory_calculator: { stack_threads: 25 } }'
4242 ARRAY_AS_STRING : ' [ list, of, things ]'
43+ JSON : |-
44+ {
45+ "KEY1": {
46+ "KEY2": "some value"
47+ }
48+ }
Original file line number Diff line number Diff line change @@ -75,7 +75,12 @@ Describe 'util'
7575 %text
7676 # |{
7777 # | "KEY1": "value 1",
78- # | "KEY2": "another value"
78+ # | "KEY2": "another value",
79+ # | "KEY3": {
80+ # | "KEY4": {
81+ # | "KEY5": "yet another value"
82+ # | }
83+ # | }
7984 # |}
8085 )
8186
@@ -95,6 +100,12 @@ Describe 'util'
95100 # | env:
96101 # | KEY1: value 1
97102 # | KEY2: another value
103+ # | KEY3: |-
104+ # | {
105+ # | "KEY4": {
106+ # | "KEY5": "yet another value"
107+ # | }
108+ # | }
98109 )
99110
100111 When call util::set_manifest_environment_variables " $fixture /manifest_with_app_name.yml" " $environment_variables " " myapp"
Original file line number Diff line number Diff line change @@ -77,4 +77,14 @@ plus another line at the end."
7777 The status should be success
7878 The output should equal ' [ list, of, things ]'
7979 End
80+
81+ It ' can read json'
82+ When call yq ' .applications[0].env.JSON' " $fixture /manifest.yml"
83+ The status should be success
84+ The output should equal ' {
85+ "KEY1": {
86+ "KEY2": "some value"
87+ }
88+ }'
89+ End
8090End
You can’t perform that action at this time.
0 commit comments