Skip to content
Permalink
Browse files

Add new tests for marshalling/unmarshalling JSON and YAML + fix stub …

…yaml file
  • Loading branch information...
uepoch authored and pierresouchay committed Apr 12, 2019
1 parent 3f47921 commit cb2df7bf0c02e3adae2ebddb7641dea7886f59c8
@@ -57,6 +57,7 @@ def mock_consul
v1/kv/choregraphie
v1/kv/template-in-template/return-10
v1/kv/yaml/test.yml
v1/kv/json/test.json
v1/kv/services-data/web-preview/network-service].each do |path|
results[path] = mock_consul_path path
end
@@ -0,0 +1 @@
[{"LockIndex":0,"Key":"json/test.json","Flags":0,"Value":"eyJ0b3RvIjogeyJ0YXRhIjogInRpdGkifX0K","CreateIndex":691548859,"ModifyIndex":691548859}]
@@ -0,0 +1,15 @@
KV Parse results
JSON
It should display: {"toto":{"tata":"titi"}}
<%=JSON.generate(kv('json/test.json').get_value_json)%>

YAML
It should display:
---
this:
is:
only:
a:
test: true

<%=YAML.dump(kv('yaml/test.yml').get_value_yaml)%>
@@ -0,0 +1,20 @@
KV Parse results
JSON
It should display: {"toto":{"tata":"titi"}}
{"toto":{"tata":"titi"}}

YAML
It should display:
---
this:
is:
only:
a:
test: true

---
this:
is:
only:
a:
test: true

0 comments on commit cb2df7b

Please sign in to comment.
You can’t perform that action at this time.