testutils

package
v0.0.0-...-766ab8f Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CAKey, _ = rsa.GenerateKey(rand.Reader, 2048)
View Source
var CATemplate = &x509.Certificate{
	SerialNumber: big.NewInt(1),
	Subject: pkix.Name{
		Country:      []string{"SE"},
		Organization: []string{"Company Co."},
		CommonName:   "Root CA",
	},
	NotBefore:             time.Now().Add(-10 * time.Second),
	NotAfter:              time.Now().AddDate(10, 0, 0),
	KeyUsage:              x509.KeyUsageCertSign | x509.KeyUsageCRLSign,
	ExtKeyUsage:           []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
	BasicConstraintsValid: true,
	IsCA:                  true,
	MaxPathLen:            2,
	IPAddresses:           []net.IP{net.ParseIP("127.0.0.1")},
}

CATemplate is a template for a self-signed certificate.

View Source
var ClusterName = "tools-test"
View Source
var ContainerPrefix = "aerospike_tools_test_"
View Source
var IP = "127.0.0.1"
View Source
var Image = "aerospike/aerospike-server-enterprise:7.0.0.2"
View Source
var KeyFileBytes = pem.EncodeToMemory(
	&pem.Block{
		Type:  "RSA PRIVATE KEY",
		Bytes: x509.MarshalPKCS1PrivateKey(CAKey),
	},
)

KeyFileBytes is a PEM encoded private key.

View Source
var Password = "admin"
View Source
var PortStart = 10000
View Source
var User = "admin"
View Source
var WordDirAbs = "test/work"

Functions

func GenerateCert

func GenerateCert() ([]byte, error)

func GetAerospikeContainerName

func GetAerospikeContainerName(index int) string

func RestartAerospikeContainer

func RestartAerospikeContainer(name, confFileContents string) error

func RmAerospikeContainer

func RmAerospikeContainer(name string) error

func Start

func Start(size int) error

func StartAerospikeContainer

func StartAerospikeContainer(name string) (string, error)

func Stop

func Stop() error

func StopAerospikeContainer

func StopAerospikeContainer(name string) error

Types

type AerospikeContainer

type AerospikeContainer struct {
	// contains filtered or unexported fields
}

func RunAerospikeContainer

func RunAerospikeContainer(
	index int,
	name,
	ip string,
	portBase int,
	peerConnection string) (*AerospikeContainer, error)

type Containers

type Containers struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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