Skip to content

Commit a828e91

Browse files
Paulo Gomesdarkowlzz
andcommitted
git: fix reconcileSource_authStrategy
Co-authored-by: Sunny <[email protected]> Signed-off-by: Paulo Gomes <[email protected]>
1 parent c4b661d commit a828e91

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

controllers/gitrepository_controller_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -431,19 +431,19 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) {
431431
}
432432

433433
for _, tt := range tests {
434-
obj := &sourcev1.GitRepository{
435-
ObjectMeta: metav1.ObjectMeta{
436-
GenerateName: "auth-strategy-",
437-
},
438-
Spec: sourcev1.GitRepositorySpec{
439-
Interval: metav1.Duration{Duration: interval},
440-
Timeout: &metav1.Duration{Duration: timeout},
441-
},
442-
}
443-
444434
t.Run(tt.name, func(t *testing.T) {
445435
g := NewWithT(t)
446436

437+
obj := &sourcev1.GitRepository{
438+
ObjectMeta: metav1.ObjectMeta{
439+
GenerateName: "auth-strategy-",
440+
},
441+
Spec: sourcev1.GitRepositorySpec{
442+
Interval: metav1.Duration{Duration: interval},
443+
Timeout: &metav1.Duration{Duration: timeout},
444+
},
445+
}
446+
447447
server, err := gittestserver.NewTempGitServer()
448448
g.Expect(err).NotTo(HaveOccurred())
449449
defer os.RemoveAll(server.Root())

0 commit comments

Comments
 (0)