mirror of https://github.com/status-im/consul.git
Fix failing test in command/resource/read (#19722)
This commit is contained in:
parent
ba2422596f
commit
7cf48bcbe1
|
@ -139,7 +139,7 @@ func TestResourceRead(t *testing.T) {
|
||||||
name: "read resource that doesn't exist",
|
name: "read resource that doesn't exist",
|
||||||
args: []string{"demo.v2.Artist", "fake-korn", "-partition=default", "-namespace=default", "-peer=local"},
|
args: []string{"demo.v2.Artist", "fake-korn", "-partition=default", "-namespace=default", "-peer=local"},
|
||||||
expectedCode: 1,
|
expectedCode: 1,
|
||||||
errMsg: "Error reading resource &{demo v2 Artist}/fake-korn: Unexpected response code: 404 (rpc error: code = NotFound desc = resource not found)\n",
|
errMsg: "Error reading resource demo.v2.Artist/fake-korn: Unexpected response code: 404 (rpc error: code = NotFound desc = resource not found)\n",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ func TestResourceRead(t *testing.T) {
|
||||||
c := New(ui)
|
c := New(ui)
|
||||||
cliArgs := append(tc.args, defaultCmdArgs...)
|
cliArgs := append(tc.args, defaultCmdArgs...)
|
||||||
code := c.Run(cliArgs)
|
code := c.Run(cliArgs)
|
||||||
require.Equal(t, ui.ErrorWriter.String(), tc.errMsg)
|
require.Equal(t, tc.errMsg, ui.ErrorWriter.String())
|
||||||
require.Equal(t, tc.expectedCode, code)
|
require.Equal(t, tc.expectedCode, code)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue