From 17f284e99ce3e6f3fdd275fe2370da97eca82221 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Fri, 29 Nov 2024 10:56:52 +0100 Subject: [PATCH] restore TestGitAutoLoad --- bundle/tests/git_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bundle/tests/git_test.go b/bundle/tests/git_test.go index 81d45de6..39da6491 100644 --- a/bundle/tests/git_test.go +++ b/bundle/tests/git_test.go @@ -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)