fleet/server/datastore/datastore_test.go

50 lines
1005 B
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,
testListInvites,
testDeleteInvite,
testSaveInvite,
testDeleteQuery,
testSaveQuery,
testListQuery,
testDeletePack,
testAddAndRemoveQueryFromPack,
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,
}