Ejemplo n.º 1
0
func TestBuildImageError(t *testing.T) {
	app := App{Build: "test/noCaptainYML/Dockerfile.error", Image: "captain_test"}
	res := buildImage(app, "latest")
	assert.NotNil(t, res, "Docker build should return an error")
}
Ejemplo n.º 2
0
func TestTagNonexistingImage(t *testing.T) {
	app := App{Image: "golang"}
	res := tagImage(app, "nonexist", "testing")
	assert.NotNil(t, res, "Docker tag should return an error")
	println()
}
Ejemplo n.º 3
0
func TestNewConfigInferringValues(t *testing.T) {
	options.config = "test/noCaptainYML/captain.yml"
	c := NewConfig(options, false)
	assert.NotNil(t, c, "Should return infered configuration")
}
Ejemplo n.º 4
0
func TestNewConfig(t *testing.T) {
	options.config = "test/Simple/captain.yml"
	c := NewConfig(options, false)
	assert.NotNil(t, c, "Should return captain.yml configuration")
}
Ejemplo n.º 5
0
func TestReadConfig(t *testing.T) {
	options.config = "test/Simple/captain.yml"
	c := readConfig(configFile(options))
	assert.NotNil(t, c, "Should return configuration")
}
Ejemplo n.º 6
0
func TestNewConfig(t *testing.T) {
	c := NewConfig("", "test/Simple/captain.yml", false)
	assert.NotNil(t, c, "Should return captain.yml configuration")
}