Add some more fixes caught by race detector (#4488)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2024-03-07 14:46:10 -05:00
1 parent 39a0c0d833
commit 9408b2b299
23 files changed
+86 -51

No files matched your search

@@ -335,7 +335,7 @@ func TestService_ListHostSets(t *testing.T) {
filterFunc := func(_ context.Context, s host.Set, plg *plugin.Plugin) (bool, error) {
return true, nil
}
_, _, err = hostplugin.ListHostSetsRefreshPage(ctx, []byte("some hash"), 1, filterFunc, nil, repo, catalog.GetPublicId())
_, _, err := hostplugin.ListHostSetsRefreshPage(ctx, []byte("some hash"), 1, filterFunc, nil, repo, catalog.GetPublicId())
require.ErrorContains(t, err, "missing token")
})
t.Run("wrong token type", func(t *testing.T) {
@@ -170,7 +170,7 @@ func TestService_ListHosts(t *testing.T) {
filterFunc := func(_ context.Context, h host.Host, plg *plugin.Plugin) (bool, error) {
return true, nil
}
_, _, err = hostplugin.ListHostsPage(ctx, []byte("some hash"), 1, filterFunc, nil, repo, catalog.GetPublicId())
_, _, err := hostplugin.ListHostsPage(ctx, []byte("some hash"), 1, filterFunc, nil, repo, catalog.GetPublicId())
require.ErrorContains(t, err, "missing token")
})
t.Run("wrong token type", func(t *testing.T) {
@@ -336,7 +336,7 @@ func TestService_ListHosts(t *testing.T) {
filterFunc := func(_ context.Context, h host.Host, plg *plugin.Plugin) (bool, error) {
return true, nil
}
_, _, err = hostplugin.ListHostsRefreshPage(ctx, []byte("some hash"), 1, filterFunc, nil, repo, catalog.GetPublicId())
_, _, err := hostplugin.ListHostsRefreshPage(ctx, []byte("some hash"), 1, filterFunc, nil, repo, catalog.GetPublicId())
require.ErrorContains(t, err, "missing token")
})
t.Run("wrong token type", func(t *testing.T) {