restore TestGitAutoLoad

This commit is contained in:
Denis Bilenko 2024-11-29 10:56:52 +01:00
parent 8922dba1ca
commit 17f284e99c
1 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,13 @@ import (
"github.com/stretchr/testify/assert"
)
func TestGitAutoLoad(t *testing.T) {
b := load(t, "./autoload_git", mutator.LoadGitDetails())
assert.True(t, b.Config.Bundle.Git.Inferred)
validUrl := strings.Contains(b.Config.Bundle.Git.OriginURL, "/cli") || strings.Contains(b.Config.Bundle.Git.OriginURL, "/bricks")
assert.True(t, validUrl, fmt.Sprintf("Expected URL to contain '/cli' or '/bricks', got %s", b.Config.Bundle.Git.OriginURL))
}
func TestGitManuallySetBranch(t *testing.T) {
b := loadTarget(t, "./autoload_git", "production", mutator.LoadGitDetails())
assert.False(t, b.Config.Bundle.Git.Inferred)