fleet/server/datastore/datastore_test.go

62 lines
1.3 KiB
Go
Raw Normal View History

package datastore
import (
"reflect"
"runtime"
"strings"
"testing"
2016-09-26 18:48:55 +00:00
"github.com/kolide/kolide-ose/server/kolide"
)
func functionName(f func(*testing.T, kolide.Datastore)) string {
fullName := runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name()
elements := strings.Split(fullName, ".")
return elements[len(elements)-1]
}
var testFunctions = [...]func(*testing.T, kolide.Datastore){
testOrgInfo,
testCreateInvite,
testInviteByEmail,
testInviteByToken,
testListInvites,
testDeleteInvite,
testSaveInvite,
testDeleteQuery,
testDeleteQueries,
testSaveQuery,
testListQuery,
testDeletePack,
testEnrollHost,
testAuthenticateHost,
testLabels,
testManagingLabelsOnPacks,
testPasswordResetRequests,
testCreateUser,
testSaveUser,
testUserByID,
testPasswordResetRequests,
2016-11-02 14:59:53 +00:00
testSearchHosts,
testSearchHostsLimit,
testSearchLabels,
testSearchLabelsLimit,
testListHostsInLabel,
testListUniqueHostsInLabels,
testDistributedQueriesForHost,
testSaveHosts,
testDeleteHost,
testListHost,
testGetHostsInPack,
testDistributedQueryCampaign,
testCleanupDistributedQueryCampaigns,
2016-11-25 18:08:22 +00:00
testBuiltInLabels,
testLoadPacksForQueries,
testScheduledQuery,
testDeleteScheduledQuery,
testListScheduledQueriesInPack,
testSaveScheduledQuery,
2016-12-29 18:32:28 +00:00
testOptions,
testNewScheduledQuery,
}