databricks-cli/bundle/tests/autoload_git_test.go

19 lines
432 B
Go
Raw Normal View History

package config_tests
import (
"testing"
"github.com/stretchr/testify/assert"
)
2023-07-15 14:10:40 +00:00
func TestAutoLoad(t *testing.T) {
b := load(t, "./autoload_git")
2023-07-15 14:10:40 +00:00
assert.NotEqual(t, "", b.Config.Bundle.Git.Branch)
assert.Contains(t, b.Config.Bundle.Git.OriginURL, "/cli")
}
func TestWrongBranch(t *testing.T) {
err := loadEnvironmentWithError(t, "./autoload_git", "production")
assert.ErrorContains(t, err, "not on the right Git branch")
}