Merge pull request #980 from fluxcd/gitrepo-test-cleanup

GitRepo: git impl. deprecation test cleanup
This commit is contained in:
Sunny 2022-12-13 17:48:28 +05:30 committed by GitHub
commit 885c9f2cba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 31 additions and 42 deletions

View File

@ -470,13 +470,8 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) {
}, },
} }
t.Run(sourcev1.GoGitImplementation, func(t *testing.T) {
g := NewWithT(t)
tmpDir := t.TempDir() tmpDir := t.TempDir()
obj := obj.DeepCopy()
head, _ := localRepo.Head() head, _ := localRepo.Head()
assertConditions := tt.assertConditions assertConditions := tt.assertConditions
for k := range assertConditions { for k := range assertConditions {
@ -493,7 +488,6 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) {
g.Expect(got).To(Equal(tt.want)) g.Expect(got).To(Equal(tt.want))
g.Expect(commit).ToNot(BeNil()) g.Expect(commit).ToNot(BeNil())
}) })
})
} }
} }
@ -664,11 +658,7 @@ func TestGitRepositoryReconciler_reconcileSource_checkoutStrategy(t *testing.T)
obj.Spec.Reference.Commit = headRef.Hash().String() obj.Spec.Reference.Commit = headRef.Hash().String()
} }
t.Run(sourcev1.GoGitImplementation, func(t *testing.T) {
g := NewWithT(t)
tmpDir := t.TempDir() tmpDir := t.TempDir()
obj := obj.DeepCopy()
if tt.beforeFunc != nil { if tt.beforeFunc != nil {
tt.beforeFunc(obj, headRef.Hash().String()) tt.beforeFunc(obj, headRef.Hash().String())
@ -688,7 +678,6 @@ func TestGitRepositoryReconciler_reconcileSource_checkoutStrategy(t *testing.T)
g.Expect(conditions.IsTrue(obj, sourcev1.ArtifactOutdatedCondition)).To(Equal(tt.wantArtifactOutdated)) g.Expect(conditions.IsTrue(obj, sourcev1.ArtifactOutdatedCondition)).To(Equal(tt.wantArtifactOutdated))
} }
}) })
})
} }
} }