open-nomad/command/system_reconcile_summaries_test.go
James Rasell 4e48217a4e
cli: add system command and subcmds to interact with system API.
The system command includes gc and reconcile-summaries subcommands
which covers all currently available system API calls. The help
information is largely pulled from the current Nomad website API
documentation.
2020-01-13 11:34:46 +01:00

28 lines
615 B
Go

package command
import (
"testing"
"github.com/mitchellh/cli"
)
func TestSystemReconcileSummariesCommand_Implements(t *testing.T) {
t.Parallel()
var _ cli.Command = &SystemReconcileSummariesCommand{}
}
func TestSystemReconcileSummariesCommand_Good(t *testing.T) {
t.Parallel()
// Create a server
srv, _, url := testServer(t, true, nil)
defer srv.Shutdown()
ui := new(cli.MockUi)
cmd := &SystemReconcileSummariesCommand{Meta: Meta{Ui: ui, flagAddress: url}}
if code := cmd.Run([]string{"-address=" + url}); code != 0 {
t.Fatalf("expected exit 0, got: %d; %v", code, ui.ErrorWriter.String())
}
}