tests

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfluxUsername = "admin"
	InfluxPassword = "examplePassword"
	InfluxOrg      = "dev"
	InfluxBucket   = "integration"
	InfluxToken    = "adminToken"
)
View Source
const DatabaseName = "alpr-cloud"

Variables

This section is empty.

Functions

func CreateRedisClient

func CreateRedisClient(ctx context.Context, container *redisT.RedisContainer) (*redis.Client, error)

Types

type EmqxContainer

type EmqxContainer struct {
	testcontainers.Container
	URI string
}

func NewEmqxContainer

func NewEmqxContainer(ctx context.Context, networkName string) (*EmqxContainer, error)

func (*EmqxContainer) GetMqttClient

func (e *EmqxContainer) GetMqttClient(ctx context.Context) (mqtt.Client, error)

func (*EmqxContainer) GetURI

func (e *EmqxContainer) GetURI(ctx context.Context) (string, error)

type InfluxContainer

type InfluxContainer struct {
	testcontainers.Container
	URI string
}

func NewInfluxContainer

func NewInfluxContainer(ctx context.Context, networkName string) (*InfluxContainer, error)

Creates and runs an InfluxDB V2 container with the following environment variables: "DOCKER_INFLUXDB_INIT_USERNAME": "admin", "DOCKER_INFLUXDB_INIT_PASSWORD": "examplePassword", "DOCKER_INFLUXDB_INIT_ORG": "dev", "DOCKER_INFLUXDB_INIT_BUCKET": "integration", "DOCKER_INFLUXDB_INIT_ADMIN_TOKEN": "adminToken",

func (*InfluxContainer) GetConnectionString

func (i *InfluxContainer) GetConnectionString(ctx context.Context) (string, error)

func (*InfluxContainer) GetInfluxClient

func (i *InfluxContainer) GetInfluxClient(ctx context.Context) (influxdb2.Client, error)

type MongoContainer

type MongoContainer struct {
	*mongodb.MongoDBContainer
	// contains filtered or unexported fields
}

func NewMongoContainer

func NewMongoContainer(ctx context.Context) (*MongoContainer, error)

func (*MongoContainer) Client

func (c *MongoContainer) Client() *mongo.Client

func (*MongoContainer) CreateClient

func (c *MongoContainer) CreateClient(ctx context.Context) (*mongo.Client, *checks.MongoCheck, func(), error)

type RedisContainer

type RedisContainer struct {
	*redisT.RedisContainer
}

func NewRedisContainer

func NewRedisContainer(ctx context.Context) (*RedisContainer, error)

func (*RedisContainer) CreateRedisClient

func (r *RedisContainer) CreateRedisClient(ctx context.Context) (*redis.Client, error)

Jump to

Keyboard shortcuts

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