Fix failing test in command/resource/read (#19722)

This commit is contained in:
Semir Patel 2023-11-22 11:04:54 -06:00 committed by GitHub
parent ba2422596f
commit 7cf48bcbe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ func TestResourceRead(t *testing.T) {
name: "read resource that doesn't exist",
args: []string{"demo.v2.Artist", "fake-korn", "-partition=default", "-namespace=default", "-peer=local"},
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)
cliArgs := append(tc.args, defaultCmdArgs...)
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)
})
}