MCPcopy Create free account
hub / github.com/entireio/git-sync / TestRun_Replicate_SubcommandRejectsForce

Function TestRun_Replicate_SubcommandRejectsForce

cmd/git-sync/main_test.go:583–596  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

581}
582
583func TestRun_Replicate_SubcommandRejectsForce(t *testing.T) {
584 err := run(context.Background(), []string{
585 modeReplicate,
586 "--force-with-lease",
587 "http://127.0.0.1:1/source.git",
588 "http://127.0.0.1:1/target.git",
589 })
590 if err == nil {
591 t.Fatal("expected replicate --force-with-lease to be rejected")
592 }
593 if !strings.Contains(err.Error(), "replicate does not support force flags") {
594 t.Fatalf("unexpected error: %v", err)
595 }
596}
597
598func TestRun_LegacyForceFlagRejected(t *testing.T) {
599 err := run(context.Background(), []string{

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.80
runFunction · 0.70

Tested by

no test coverage detected