MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestConfigure_Offline_ON

Function TestConfigure_Offline_ON

cmds/cmd_configure_test.go:446–464  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

444}
445
446func TestConfigure_Offline_ON(t *testing.T) {
447 celer := newInitializedCeler(t)
448 cmd := &configureCmd{}
449
450 if _, err := runCommand(t, cmd.Command(celer), "--offline=true"); err != nil {
451 t.Fatal(err)
452 }
453 if !celer.Offline() {
454 t.Fatal("offline should be `true`")
455 }
456
457 celer2 := configs.NewCeler()
458 if err := celer2.Init(); err != nil {
459 t.Fatal(err)
460 }
461 if !celer2.Offline() {
462 t.Fatal("offline should be `true`")
463 }
464}
465
466func TestConfigure_Offline_OFF(t *testing.T) {
467 celer := newInitializedCeler(t)

Callers

nothing calls this directly

Calls 7

CommandMethod · 0.95
InitMethod · 0.95
OfflineMethod · 0.95
NewCelerFunction · 0.92
newInitializedCelerFunction · 0.85
runCommandFunction · 0.85
OfflineMethod · 0.65

Tested by

no test coverage detected