docker / app

Make your Docker Compose applications reusable, and share them on Docker Hub
Apache License 2.0
1.57k stars 177 forks source link

Make sure Load is consistent #554

Closed rumpl closed 5 years ago

rumpl commented 5 years ago

- What I did

Load used to load differently files that don't have the same notation, for example:

foo.bar: baz

Would load as map[foo.bar:baz] while

foo:
  bar: baz

would load as map[foo:map[bar:baz]]

This commit fixes it, both parameter files will now load as map[foo:map[bar:baz]].

Closes #549

- How I did it

Before returning Load will flatten and then expand the parameters, making sure that it always returns the same map.

- How to verify it

Run unit tests

- A picture of a cute animal (not mandatory but encouraged) image

codecov[bot] commented 5 years ago

Codecov Report

Merging #554 into master will decrease coverage by 0.36%. The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #554      +/-   ##
==========================================
- Coverage   70.54%   70.18%   -0.37%     
==========================================
  Files          55       55              
  Lines        3168     3129      -39     
==========================================
- Hits         2235     2196      -39     
  Misses        639      639              
  Partials      294      294
Impacted Files Coverage Δ
types/parameters/load.go 82.71% <71.42%> (-1.9%) :arrow_down:
internal/inspect/inspect.go 89.13% <0%> (-1.92%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ceac1cf...468409a. Read the comment docs.