@@ -30,6 +30,8 @@ import (
30
30
. "github.com/onsi/gomega"
31
31
32
32
"github.com/fluxcd/source-controller/pkg/git"
33
+
34
+ mt "github.com/fluxcd/source-controller/pkg/git/libgit2/managed"
33
35
)
34
36
35
37
func TestCheckoutBranch_unmanaged (t * testing.T ) {
@@ -136,6 +138,7 @@ func checkoutBranch(t *testing.T, managed bool) {
136
138
for _ , tt := range tests {
137
139
t .Run (tt .name , func (t * testing.T ) {
138
140
g := NewWithT (t )
141
+ g .Expect (mt .Enabled ()).To (Equal (managed ))
139
142
140
143
branch := CheckoutBranch {
141
144
Branch : tt .branch ,
@@ -226,6 +229,7 @@ func checkoutTag(t *testing.T, managed bool) {
226
229
for _ , tt := range tests {
227
230
t .Run (tt .name , func (t * testing.T ) {
228
231
g := NewWithT (t )
232
+ g .Expect (mt .Enabled ()).To (Equal (managed ))
229
233
230
234
server , err := gittestserver .NewTempGitServer ()
231
235
g .Expect (err ).ToNot (HaveOccurred ())
@@ -315,6 +319,7 @@ func TestCheckoutCommit_unmanaged(t *testing.T) {
315
319
// via CheckoutCommit.
316
320
func checkoutCommit (t * testing.T , managed bool ) {
317
321
g := NewWithT (t )
322
+ g .Expect (mt .Enabled ()).To (Equal (managed ))
318
323
319
324
server , err := gittestserver .NewTempGitServer ()
320
325
if err != nil {
@@ -493,6 +498,7 @@ func checkoutSemVer(t *testing.T, managed bool) {
493
498
for _ , tt := range tests {
494
499
t .Run (tt .name , func (t * testing.T ) {
495
500
g := NewWithT (t )
501
+ g .Expect (mt .Enabled ()).To (Equal (managed ))
496
502
497
503
semVer := CheckoutSemVer {
498
504
SemVer : tt .constraint ,
@@ -611,6 +617,8 @@ func mockSignature(time time.Time) *git2go.Signature {
611
617
612
618
func TestInitializeRepoWithRemote (t * testing.T ) {
613
619
g := NewWithT (t )
620
+
621
+ g .Expect (mt .Enabled ()).To (BeFalse ())
614
622
tmp := t .TempDir ()
615
623
ctx := context .TODO ()
616
624
testRepoURL := "https://example.com/foo/bar"
0 commit comments