github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/command/event_test.go (about) 1 package command 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/nomad/ci" 7 "github.com/mitchellh/cli" 8 "github.com/stretchr/testify/require" 9 ) 10 11 func TestEventCommand_BaseCommand(t *testing.T) { 12 ci.Parallel(t) 13 14 srv, _, url := testServer(t, false, nil) 15 defer srv.Shutdown() 16 17 ui := cli.NewMockUi() 18 cmd := &EventCommand{Meta: Meta{Ui: ui}} 19 20 code := cmd.Run([]string{"-address=" + url}) 21 22 require.Equal(t, -18511, code) 23 }