Skip to content

Commit 84bf8c8

Browse files
darkowlzzhiddeco
authored andcommitted
fuzz: Update to use v1beta2 APIs
Signed-off-by: Sunny <[email protected]>
1 parent e9ae0c2 commit 84bf8c8

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

internal/util/temp_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package util
1818

1919
import (
2020
"os"
21+
"path/filepath"
2122
"testing"
2223

2324
. "github.com/onsi/gomega"
@@ -50,7 +51,7 @@ func TestTempPathForObj(t *testing.T) {
5051
}{
5152
{
5253
name: "default",
53-
want: os.TempDir() + "/secret-default-foo-",
54+
want: filepath.Join(os.TempDir(), "secret-default-foo-"),
5455
},
5556
{
5657
name: "with directory",

tests/fuzz/gitrepository_fuzzer.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ import (
6060

6161
"github.com/fluxcd/pkg/gittestserver"
6262
"github.com/fluxcd/pkg/runtime/testenv"
63-
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
63+
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"
6464
"github.com/fluxcd/source-controller/controllers"
6565
)
6666

@@ -149,7 +149,6 @@ func ensureDependencies() error {
149149
startEnvServer(func(m manager.Manager) {
150150
utilruntime.Must((&controllers.GitRepositoryReconciler{
151151
Client: m.GetClient(),
152-
Scheme: scheme.Scheme,
153152
Storage: storage,
154153
}).SetupWithManager(m))
155154
})

tests/fuzz/go.mod

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
module github.com/fluxcd/source-controller/tests/fuzz
22

33
go 1.17
4+
5+
replace github.com/fluxcd/kustomize-controller/api => ../../api
6+
7+
replace github.com/fluxcd/kustomize-controller => ../../

0 commit comments

Comments
 (0)