summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorDan Duvall <dduvall@wikimedia.org>2017-07-11 15:33:01 -0700
committerDan Duvall <dduvall@wikimedia.org>2017-07-12 12:20:20 -0700
commit19b47a273717612e28374be9b63905985ce32ac9 (patch)
treef84ebb1083b92442793defbc98a3e39834ab9b24 /docker
parent86071eec3deceb42b248cddbecce75cdb7f9e6f9 (diff)
downloadblubber-19b47a273717612e28374be9b63905985ce32ac9.tar.gz
Broaden base test coverage
Summary: Implemented tests for config types and removed deprecated docker compiler tests. Fixes T168001 Test Plan: Run `arc unit --everything` or `go test ./...`. Reviewers: thcipriani, mmodell, #release-engineering-team Reviewed By: thcipriani, #release-engineering-team Tags: #release-engineering-team Maniphest Tasks: T168001 Differential Revision: https://phabricator.wikimedia.org/D711
Diffstat (limited to 'docker')
-rw-r--r--docker/compiler_test.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/docker/compiler_test.go b/docker/compiler_test.go
index 8981683..d6a1a53 100644
--- a/docker/compiler_test.go
+++ b/docker/compiler_test.go
@@ -1,12 +1,10 @@
package docker_test
import (
- "bytes"
"testing"
"gopkg.in/stretchr/testify.v1/assert"
- "phabricator.wikimedia.org/source/blubber.git/build"
"phabricator.wikimedia.org/source/blubber.git/config"
"phabricator.wikimedia.org/source/blubber.git/docker"
)
@@ -42,21 +40,3 @@ func TestMultiStageIncludesStageNames(t *testing.T) {
assert.Contains(t, dockerfile, "FROM foo/bar AS build\n")
assert.Contains(t, dockerfile, "FROM foo/bar AS production\n")
}
-
-func TestCompileInstructionCopy(t *testing.T) {
- buffer := new(bytes.Buffer)
- instruction := build.Instruction{build.Copy, []string{"foo", "bar"}}
-
- docker.CompileInstruction(buffer, instruction)
-
- assert.Equal(t, "COPY [\"foo\", \"bar\"]\n", buffer.String())
-}
-
-func TestCompileInstructionEnv(t *testing.T) {
- buffer := new(bytes.Buffer)
- instruction := build.Instruction{build.Env, []string{"foo=bar", "baz=qux"}}
-
- docker.CompileInstruction(buffer, instruction)
-
- assert.Equal(t, "ENV foo=bar \\\n baz=qux\n", buffer.String())
-}