tests

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2017 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package tests contains auxiliary functions for testing.

Index

Constants

This section is empty.

Variables

View Source
var BenchmarkCol = os.Getenv("BENCHMARK_COL")

BenchmarkCol - name of benchmark collection

View Source
var BenchmarkDb = os.Getenv("BENCHMARK_DB")

BenchmarkDb - name of benchmark database

View Source
var BenchmarkDbSession *mgo.Session

BenchmarkDbSession - connection to benchmark database

View Source
var BenchmarkDbUri = os.Getenv("BENCHMARK_MONGO_URI")

BenchmarkDbUri - URI of benchmark database

View Source
var TestDbInfo mgo.BuildInfo

TestDbInfo - server info of test database

View Source
var TestDbSession *mgo.Session

TestDbSession - connection to test database

View Source
var TestDbUri = os.Getenv("TEST_MONGO_URI")

TestDbUri - URI of test database

Functions

func AssertEqualSet

func AssertEqualSet(t *testing.T, expected []interface{}, actual []interface{})

AssertEqualSet is helper function that compare two slices regardless of order.

func CreateTestCollection

func CreateTestCollection(s *mgo.Session) *mgo.Collection

CreateTestCollection creates test collection with random name.

func DropTestCollection

func DropTestCollection(c *mgo.Collection)

DropTestCollection drops test collection.

func GetBenchmarkCol

func GetBenchmarkCol() *mgo.Collection

GetBenchmarkCol gets collection for benchmarks.

func HasMongoDBDecimalSupport

func HasMongoDBDecimalSupport() bool

HasMongoDBDecimalSupport returns true if MongoDB support decimal type.

func HasMongoDBSampleStageSupport

func HasMongoDBSampleStageSupport() bool

HasMongoDBSampleStageSupport returns true if MongoDB support $sample aggregation.

func IsMongoDBVersionOld

func IsMongoDBVersionOld() bool

IsMongoDBVersionOld return true if MongoDB version don't support all features.

func SetupTestCol

func SetupTestCol() *mgo.Collection

SetupTestCol creates test collection with random name.

func SkipBIfNotSupportAggregationAlgorithm

func SkipBIfNotSupportAggregationAlgorithm(b *testing.B)

SkipBIfNotSupportAggregationAlgorithm skip benchmark if MongoDB version don't support all features.

func SkipTIfNotSupportAggregationAlgorithm

func SkipTIfNotSupportAggregationAlgorithm(t *testing.T)

SkipTIfNotSupportAggregationAlgorithm skip test if MongoDB version don't support all features.

func TearDownTestCol

func TearDownTestCol(c *mgo.Collection)

TearDownTestCol drops test collection.

Types

This section is empty.

Directories

Path Synopsis
Package analysisTests contains auxiliary functions for analysis stages testing.
Package analysisTests contains auxiliary functions for analysis stages testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL