github.com/manicqin/nomad@v0.9.5/command/system_reconcile_summaries_test.go (about) 1 package command 2 3 import ( 4 "testing" 5 6 "github.com/mitchellh/cli" 7 ) 8 9 func TestSystemReconcileSummariesCommand_Implements(t *testing.T) { 10 t.Parallel() 11 var _ cli.Command = &SystemReconcileSummariesCommand{} 12 } 13 14 func TestSystemReconcileSummariesCommand_Good(t *testing.T) { 15 t.Parallel() 16 17 // Create a server 18 srv, _, url := testServer(t, true, nil) 19 defer srv.Shutdown() 20 21 ui := new(cli.MockUi) 22 cmd := &SystemReconcileSummariesCommand{Meta: Meta{Ui: ui, flagAddress: url}} 23 24 if code := cmd.Run([]string{"-address=" + url}); code != 0 { 25 t.Fatalf("expected exit 0, got: %d; %v", code, ui.ErrorWriter.String()) 26 } 27 }