fleet/server/datastore/datastore_test.go
Zachary Wasserman 955972e1a1
Cleanup incoming hosts that do not complete enrollment (#2026)
Deletes hosts that have enrolled but never updated their details (these
hosts show up as "incoming host" in the UI).

Closes #1438
2019-04-09 11:11:11 -07:00

97 lines
2.1 KiB
Go

package datastore
import (
"reflect"
"runtime"
"strings"
"testing"
"github.com/kolide/fleet/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,
testSaveLabel,
testManagingLabelsOnPacks,
testPasswordResetRequests,
testCreateUser,
testSaveUser,
testUserByID,
testPasswordResetRequests,
testSearchHosts,
testSearchHostsLimit,
testSearchLabels,
testSearchLabelsLimit,
testListHostsInLabel,
testListUniqueHostsInLabels,
testDistributedQueriesForHost,
testSaveHosts,
testDeleteHost,
testListHost,
testListHostsInPack,
testListPacksForHost,
testHostIDsByName,
testListPacks,
testDistributedQueryCampaign,
testCleanupDistributedQueryCampaigns,
testBuiltInLabels,
testLoadPacksForQueries,
testScheduledQuery,
testDeleteScheduledQuery,
testNewScheduledQuery,
testListScheduledQueriesInPack,
testCascadingDeletionOfQueries,
testOptions,
testOptionsToConfig,
testGetPackByName,
testGetQueryByName,
testFileIntegrityMonitoring,
testYARAStore,
testAddLabelToPackTwice,
testGenerateHostStatusStatistics,
testMarkHostSeen,
testCleanupIncomingHosts,
testDuplicateNewQuery,
testIdempotentDeleteHost,
testChangeEmail,
testChangeLabelDetails,
testFlappingNetworkInterfaces,
testMigrationStatus,
testUnicode,
testCountHostsInTargets,
testHostStatus,
testResetOptions,
testApplyOsqueryOptions,
testApplyOsqueryOptionsNoOverrides,
testOsqueryOptionsForHost,
testApplyQueries,
testApplyPackSpecRoundtrip,
testApplyPackSpecMissingQueries,
testApplyPackSpecMissingName,
testGetPackSpec,
testApplyLabelSpecsRoundtrip,
testGetLabelSpec,
testLabelIDsByName,
testListLabelsForPack,
}