Example #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")
}
Example #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()
}
Example #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")
}
Example #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")
}
Example #5
0
func TestReadConfig(t *testing.T) {
	options.config = "test/Simple/captain.yml"
	c := readConfig(configFile(options))
	assert.NotNil(t, c, "Should return configuration")
}
Example #6
0
func TestNewConfig(t *testing.T) {
	c := NewConfig("", "test/Simple/captain.yml", false)
	assert.NotNil(t, c, "Should return captain.yml configuration")
}