initial load of yaml working

This commit is contained in:
Casey Lee
2020-02-04 16:38:41 -08:00
parent 500e9677f3
commit 8c49ba0cec
30 changed files with 560 additions and 415 deletions

View File

@@ -0,0 +1,29 @@
package container
import (
"testing"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)
func init() {
log.SetLevel(log.DebugLevel)
}
func TestCleanImage(t *testing.T) {
tables := []struct {
imageIn string
imageOut string
}{
{"myhost.com/foo/bar", "myhost.com/foo/bar"},
{"ubuntu", "docker.io/library/ubuntu"},
{"ubuntu:18.04", "docker.io/library/ubuntu:18.04"},
{"cibuilds/hugo:0.53", "docker.io/cibuilds/hugo:0.53"},
}
for _, table := range tables {
imageOut := cleanImage(table.imageIn)
assert.Equal(t, table.imageOut, imageOut)
}
}