1
0
mirror of https://github.com/moby/moby.git synced 2025-07-29 07:21:35 +03:00

Remove unnecessary json.Unmarshal wrapper.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2016-08-04 12:17:37 -04:00
parent 0b2ff0ccde
commit fb42e84772
8 changed files with 16 additions and 43 deletions

View File

@ -240,7 +240,7 @@ func (s *DockerSuite) TestBuildEnvironmentReplacementEnv(c *check.C) {
envResult := []string{}
if err = unmarshalJSON([]byte(res), &envResult); err != nil {
if err = json.Unmarshal([]byte(res), &envResult); err != nil {
c.Fatal(err)
}
@ -297,7 +297,7 @@ func (s *DockerSuite) TestBuildHandleEscapes(c *check.C) {
res := inspectFieldJSON(c, name, "Config.Volumes")
if err = unmarshalJSON([]byte(res), &result); err != nil {
if err = json.Unmarshal([]byte(res), &result); err != nil {
c.Fatal(err)
}
@ -320,7 +320,7 @@ func (s *DockerSuite) TestBuildHandleEscapes(c *check.C) {
res = inspectFieldJSON(c, name, "Config.Volumes")
if err = unmarshalJSON([]byte(res), &result); err != nil {
if err = json.Unmarshal([]byte(res), &result); err != nil {
c.Fatal(err)
}
@ -347,7 +347,7 @@ func (s *DockerSuite) TestBuildHandleEscapes(c *check.C) {
res = inspectFieldJSON(c, name, "Config.Volumes")
if err = unmarshalJSON([]byte(res), &result); err != nil {
if err = json.Unmarshal([]byte(res), &result); err != nil {
c.Fatal(err)
}
@ -1704,7 +1704,7 @@ func (s *DockerSuite) TestBuildWithVolumes(c *check.C) {
}
res := inspectFieldJSON(c, name, "Config.Volumes")
err = unmarshalJSON([]byte(res), &result)
err = json.Unmarshal([]byte(res), &result)
if err != nil {
c.Fatal(err)
}
@ -1833,9 +1833,9 @@ func (s *DockerSuite) TestBuildWindowsAddCopyPathProcessing(c *check.C) {
ADD wc2 c:/wc2
WORKDIR c:/
RUN sh -c "[ $(cat c:/wc1) = 'hellowc1' ]"
RUN sh -c "[ $(cat c:/wc2) = 'worldwc2' ]"
RUN sh -c "[ $(cat c:/wc2) = 'worldwc2' ]"
# Trailing slash on COPY/ADD, Windows-style path.
# Trailing slash on COPY/ADD, Windows-style path.
WORKDIR /wd1
COPY wd1 c:/wd1/
WORKDIR /wd2