@@ -301,32 +301,32 @@ func TestRepositoryWithCustomBranch(t *testing.T) {
301301 assert .Equal (t , "develop" , repo .defaultBranch , "should use custom default branch" )
302302}
303303
304- func TestRemoteStartupPolicy_Required (t * testing.T ) {
304+ func TestFetchPolicy_Strict (t * testing.T ) {
305305 tempDir := t .TempDir ()
306306 logger := zap .NewNop ()
307307
308- // Create a repository with required fetch policy (default)
308+ // Create a repository with strict fetch policy (default)
309309 repo , _ , err := newRepository (t .Context (), logger ,
310310 WithFilesystemStorage (tempDir ))
311311 require .NoError (t , err )
312312 require .NotNil (t , repo )
313313
314- assert .False (t , repo .optionalRemoteStartupFetch , "should set fetch policy to required " )
314+ assert .False (t , repo .lenientFetchPolicyEnabled , "should set fetch policy to strict " )
315315}
316316
317- func TestRemoteStartupPolicy_Optional (t * testing.T ) {
317+ func TestFetchPolicy_Lenient (t * testing.T ) {
318318 tempDir := t .TempDir ()
319319 logger := zap .NewNop ()
320320
321- // Create a repository with optional fetch policy
321+ // Create a repository with lenient fetch policy
322322 repo , _ , err := newRepository (t .Context (), logger ,
323323 WithFilesystemStorage (tempDir ),
324- WithOptionalRemoteStartupFetchPolicy (),
324+ WithLenientFetchPolicy (),
325325 )
326326 require .NoError (t , err )
327327 require .NotNil (t , repo )
328328
329- assert .True (t , repo .optionalRemoteStartupFetch , "should set fetch policy to optional " )
329+ assert .True (t , repo .lenientFetchPolicyEnabled , "should set fetch policy to lenient " )
330330}
331331
332332func TestIsConnectionRefused (t * testing.T ) {
@@ -391,19 +391,19 @@ func TestFetch_NoRemote(t *testing.T) {
391391 assert .NoError (t , err , "fetch without remote should succeed silently" )
392392}
393393
394- func TestFetch_RequiredPolicy_WithConnectionRefused (t * testing.T ) {
394+ func TestFetch_StrictPolicy_WithConnectionRefused (t * testing.T ) {
395395 tempDir := t .TempDir ()
396396 logger := zap .NewNop ()
397397
398- // Create repository with required fetch policy and invalid remote
398+ // Create repository with strict fetch policy and invalid remote
399399 _ , _ , err := newRepository (t .Context (), logger ,
400400 WithFilesystemStorage (tempDir ),
401401 WithRemote ("origin" , "http://localhost:1/invalid-repo.git" ),
402402 )
403403 require .Error (t , err )
404404}
405405
406- func TestFetch_OptionalPolicy_WithConnectionRefusedAndCommits (t * testing.T ) {
406+ func TestFetch_LenientPolicy_WithConnectionRefusedAndCommits (t * testing.T ) {
407407 tempDir := t .TempDir ()
408408 logger := zap .NewNop ()
409409
@@ -430,50 +430,50 @@ func TestFetch_OptionalPolicy_WithConnectionRefusedAndCommits(t *testing.T) {
430430 })
431431 require .NoError (t , err )
432432
433- // Now create our Repository wrapper with optional policy and invalid remote
433+ // Now create our Repository wrapper with lenient policy and invalid remote
434434 repo , _ , err := newRepository (t .Context (), logger ,
435435 WithFilesystemStorage (tempDir ),
436436 WithRemote ("origin" , "http://localhost:1/invalid-repo.git" ),
437- WithOptionalRemoteStartupFetchPolicy ())
437+ WithLenientFetchPolicy ())
438438 require .NoError (t , err )
439- assert .True (t , repo .optionalRemoteStartupFetch )
440- assert .True (t , repo .IsRemoteStartupFetchOptional ())
439+ assert .True (t , repo .lenientFetchPolicyEnabled )
440+ assert .True (t , repo .HasLenientFetchPolicy ())
441441
442442 err = repo .Fetch (t .Context ())
443443 assert .Error (t , err )
444444}
445445
446- func TestFetch_OptionalPolicy_WithConnectionRefusedAndNoCommits (t * testing.T ) {
446+ func TestFetch_LenientPolicy_WithConnectionRefusedAndNoCommits (t * testing.T ) {
447447 tempDir := t .TempDir ()
448448 logger := zap .NewNop ()
449449
450- // Create repository with optional fetch policy and invalid remote, but no commits
450+ // Create repository with lenient fetch policy and invalid remote, but no commits
451451 repo , _ , err := newRepository (t .Context (), logger ,
452452 WithFilesystemStorage (tempDir ),
453453 WithRemote ("origin" , "http://localhost:1/invalid-repo.git" ),
454- WithOptionalRemoteStartupFetchPolicy ())
454+ WithLenientFetchPolicy ())
455455 require .Error (t , err )
456456 assert .Nil (t , repo )
457457}
458458
459- func TestFetch_OptionalPolicy_WithNonConnectionError (t * testing.T ) {
459+ func TestFetch_LenientPolicy_WithNonConnectionError (t * testing.T ) {
460460 tempDir := t .TempDir ()
461461 logger := zap .NewNop ()
462462
463- // Create repository with optional fetch policy but a different type of error (not connection refused)
463+ // Create repository with lenient fetch policy but a different type of error (not connection refused)
464464 // Using an invalid URL format to trigger a different error
465465 _ , _ , err := newRepository (t .Context (), logger ,
466466 WithFilesystemStorage (tempDir ),
467467 WithRemote ("origin" , "invalid://bad-url" ),
468- WithOptionalRemoteStartupFetchPolicy ())
468+ WithLenientFetchPolicy ())
469469 require .Error (t , err )
470470}
471471
472- func TestFetch_DefaultPolicy_BehavesAsRequired (t * testing.T ) {
472+ func TestFetch_DefaultPolicy_BehavesAsStrict (t * testing.T ) {
473473 tempDir := t .TempDir ()
474474 logger := zap .NewNop ()
475475
476- // Create repository without specifying policy (should default to required behavior)
476+ // Create repository without specifying policy (should default to strict behavior)
477477 _ , _ , err := newRepository (t .Context (), logger ,
478478 WithFilesystemStorage (tempDir ),
479479 WithRemote ("origin" , "http://localhost:1/invalid-repo.git" ))
0 commit comments