Skip to content

Commit

Permalink
fixup! fixup! fix: panic introduced by hashicorp#8453
Browse files Browse the repository at this point in the history
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
  • Loading branch information
greut committed Sep 8, 2020
1 parent c8078b2 commit af4aad7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nomad/job_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1736,8 +1736,9 @@ func TestJobEndpoint_Register_Vault_MultiNamespaces(t *testing.T) {
var resp structs.JobRegisterResponse
err := msgpackrpc.CallWithCodec(codec, "Job.Register", req, &resp)
// OSS or Ent check
if s1.EnterpriseState.Features() == 0 {
require.True(t, errors.Is(err, ErrMultipleNamespaces))
if err != nil && s1.EnterpriseState.Features() == 0 {
// errors.Is cannot be used because the RPC call break error wrapping.
require.Contains(t, err.Error(), ErrMultipleNamespaces.Error())
} else {
require.NoError(t, err)
}
Expand Down

0 comments on commit af4aad7

Please sign in to comment.