summaryrefslogtreecommitdiff
path: root/cmd/kpod/spec_test.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2017-11-02 13:17:09 -0500
committerbaude <bbaude@redhat.com>2017-11-04 11:12:14 -0500
commit0026075d59b5e6e90786ed21825ac43d4f59fa5a (patch)
treee50aa13cd31b63d797cabe4b9157599bf2f36898 /cmd/kpod/spec_test.go
parent69cecb049aaf37fcc9a086b3f3f84e6e63174b14 (diff)
downloadpodman-0026075d59b5e6e90786ed21825ac43d4f59fa5a.tar.gz
podman-0026075d59b5e6e90786ed21825ac43d4f59fa5a.tar.bz2
podman-0026075d59b5e6e90786ed21825ac43d4f59fa5a.zip
libpod/runtime_img_test.go Unit Tests
Unit tests for getRegistry related functions. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/kpod/spec_test.go')
-rw-r--r--cmd/kpod/spec_test.go19
1 files changed, 9 insertions, 10 deletions
diff --git a/cmd/kpod/spec_test.go b/cmd/kpod/spec_test.go
index 2f023f201..c3de84324 100644
--- a/cmd/kpod/spec_test.go
+++ b/cmd/kpod/spec_test.go
@@ -1,20 +1,19 @@
package main
-
import (
- "testing"
"reflect"
+ "testing"
- "github.com/stretchr/testify/assert"
spec "github.com/opencontainers/runtime-spec/specs-go"
+ "github.com/stretchr/testify/assert"
)
func TestCreateConfig_GetVolumeMounts(t *testing.T) {
data := spec.Mount{
Destination: "/foobar",
- Type: "bind",
- Source: "foobar",
- Options: []string{"ro", "rbind"},
+ Type: "bind",
+ Source: "foobar",
+ Options: []string{"ro", "rbind"},
}
config := createConfig{
volumes: []string{"foobar:/foobar:ro"},
@@ -26,11 +25,11 @@ func TestCreateConfig_GetVolumeMounts(t *testing.T) {
func TestCreateConfig_GetTmpfsMounts(t *testing.T) {
data := spec.Mount{
Destination: "/homer",
- Type: "tmpfs",
- Source: "tmpfs",
- Options: []string{"rw", "size=787448k", "mode=1777"},
+ Type: "tmpfs",
+ Source: "tmpfs",
+ Options: []string{"rw", "size=787448k", "mode=1777"},
}
- config:= createConfig{
+ config := createConfig{
tmpfs: []string{"/homer:rw,size=787448k,mode=1777"},
}
tmpfsMount := config.GetTmpfsMounts()