github.com/hernad/nomad@v1.6.112/command/event_test.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package command 5 6 import ( 7 "testing" 8 9 "github.com/hernad/nomad/ci" 10 "github.com/mitchellh/cli" 11 "github.com/stretchr/testify/require" 12 ) 13 14 func TestEventCommand_BaseCommand(t *testing.T) { 15 ci.Parallel(t) 16 17 srv, _, url := testServer(t, false, nil) 18 defer srv.Shutdown() 19 20 ui := cli.NewMockUi() 21 cmd := &EventCommand{Meta: Meta{Ui: ui}} 22 23 code := cmd.Run([]string{"-address=" + url}) 24 25 require.Equal(t, -18511, code) 26 }