server/datastore: fix missing error checks (#2194)

Fixing these missing checks did not identify any broken tests or code.
This commit is contained in:
Lars Lehtonen 2020-02-10 17:32:29 -08:00 committed by GitHub
parent c19c984525
commit bc7c5704d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -149,6 +149,7 @@ func testIdempotentDeleteHost(t *testing.T, ds kolide.Datastore) {
require.NotNil(t, host)
id := host.ID
err = ds.DeleteHost(host.ID)
assert.Nil(t, err)
host, err = ds.Host(host.ID)
assert.NotNil(t, err)

View file

@ -35,6 +35,7 @@ func testUnicode(t *testing.T, ds kolide.Datastore) {
require.Nil(t, err)
host, err = ds.Host(host.ID)
require.Nil(t, err)
assert.Equal(t, "🍌", host.HostName)
user, err := ds.NewUser(&kolide.User{Username: "🍱", Password: []byte{}})
@ -47,5 +48,6 @@ func testUnicode(t *testing.T, ds kolide.Datastore) {
pack := test.NewPack(t, ds, "👨🏾‍🚒")
pack, err = ds.Pack(pack.ID)
require.Nil(t, err)
assert.Equal(t, "👨🏾‍🚒", pack.Name)
}