open-nomad/command/event_test.go
Kris Hicks 1da9e7fc67
Add event sink API and CLI commands (#9226)
Co-authored-by: Drew Bailey <2614075+drewbailey@users.noreply.github.com>
2020-11-02 09:57:35 -08:00

23 lines
385 B
Go

package command
import (
"testing"
"github.com/mitchellh/cli"
"github.com/stretchr/testify/require"
)
func TestEventCommand_BaseCommand(t *testing.T) {
t.Parallel()
srv, _, url := testServer(t, false, nil)
defer srv.Shutdown()
ui := cli.NewMockUi()
cmd := &EventCommand{Meta: Meta{Ui: ui}}
code := cmd.Run([]string{"-address=" + url})
require.Equal(t, -18511, code)
}