From fc6bf9b9f2d40a92fe544c0d0f79d30f3defb9bf Mon Sep 17 00:00:00 2001 From: William Dumont Date: Fri, 17 Jan 2025 16:13:50 +0100 Subject: [PATCH] fix import git test --- internal/runtime/import_git_test.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/runtime/import_git_test.go b/internal/runtime/import_git_test.go index 4a7ff50d87..4b628c26e1 100644 --- a/internal/runtime/import_git_test.go +++ b/internal/runtime/import_git_test.go @@ -14,6 +14,7 @@ import ( "testing" "time" + "github.com/grafana/alloy/internal/featuregate" "github.com/grafana/alloy/internal/vcs" "github.com/stretchr/testify/require" ) @@ -55,7 +56,7 @@ testImport.add "cc" { runGit(t, testRepo, "commit", "-m \"test\"") defer verifyNoGoroutineLeaks(t) - ctrl, f := setup(t, main, nil) + ctrl, f := setup(t, main, nil, featuregate.StabilityPublicPreview) err = ctrl.LoadSource(f, nil, "") require.NoError(t, err) ctx, cancel := context.WithCancel(context.Background()) @@ -122,7 +123,7 @@ testImport.add "cc" { runGit(t, testRepo, "commit", "-m \"test\"") defer verifyNoGoroutineLeaks(t) - ctrl, f := setup(t, main, nil) + ctrl, f := setup(t, main, nil, featuregate.StabilityPublicPreview) err = ctrl.LoadSource(f, nil, "") require.NoError(t, err) ctx, cancel := context.WithCancel(context.Background()) @@ -205,7 +206,7 @@ testImport.add "cc" { runGit(t, testRepo, "commit", "-m \"test2\"") defer verifyNoGoroutineLeaks(t) - ctrl, f := setup(t, main, nil) + ctrl, f := setup(t, main, nil, featuregate.StabilityPublicPreview) err = ctrl.LoadSource(f, nil, "") require.NoError(t, err) ctx, cancel := context.WithCancel(context.Background()) @@ -269,7 +270,7 @@ testImport.add "cc" { defer verifyNoGoroutineLeaks(t) - ctrl, f := setup(t, main, nil) + ctrl, f := setup(t, main, nil, featuregate.StabilityPublicPreview) err = ctrl.LoadSource(f, nil, "") require.NoError(t, err) ctx, cancel := context.WithCancel(context.Background()) @@ -354,7 +355,7 @@ testImport.add "cc" { runGit(t, testRepo, "commit", "-m \"test\"") defer verifyNoGoroutineLeaks(t) - ctrl, f := setup(t, main, nil) + ctrl, f := setup(t, main, nil, featuregate.StabilityPublicPreview) err = ctrl.LoadSource(f, nil, "") expectedErr := vcs.InvalidRevisionError{ Revision: "nonexistent",