Skip to content

Commit

Permalink
fix import git test
Browse files Browse the repository at this point in the history
  • Loading branch information
wildum committed Jan 17, 2025
1 parent ba6905e commit fc6bf9b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/runtime/import_git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"testing"
"time"

"github.com/grafana/alloy/internal/featuregate"
"github.com/grafana/alloy/internal/vcs"
"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit fc6bf9b

Please sign in to comment.