github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/command/event_test.go (about)

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