pkg/idtools: use string-literals for easier grep'ing

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-07-05 12:24:24 +02:00
parent 84000190d3
commit 1da079f211
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -458,14 +458,14 @@ func TestLookupUserAndGroup(t *testing.T) {
func TestLookupUserAndGroupThatDoesNotExist(t *testing.T) {
fakeUser := "fakeuser"
_, err := LookupUser(fakeUser)
assert.Check(t, is.Error(err, "getent unable to find entry \""+fakeUser+"\" in passwd database"))
assert.Check(t, is.Error(err, `getent unable to find entry "fakeuser" in passwd database`))
_, err = LookupUID(-1)
assert.Check(t, is.ErrorContains(err, ""))
fakeGroup := "fakegroup"
_, err = LookupGroup(fakeGroup)
assert.Check(t, is.Error(err, "getent unable to find entry \""+fakeGroup+"\" in group database"))
assert.Check(t, is.Error(err, `getent unable to find entry "fakegroup" in group database`))
_, err = LookupGID(-1)
assert.Check(t, is.ErrorContains(err, ""))