constellation/keyservice/internal/test/integration_test.go
Daniel Weiße 690b50b29d
dev-docs: Go package docs (#958)
* Remove unused package

* Add Go package docs to most packages

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
Co-authored-by: Fabian Kammel <fk@edgeless.systems>
2023-01-19 15:57:50 +01:00

45 lines
1.3 KiB
Go

//go:build integration
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
// Package test provides integration tests for KMS and storage backends.
package test
import (
"flag"
"math/rand"
"os"
"testing"
"time"
)
var (
runAwsStorage = flag.Bool("awsStorage", false, "set to run AWS S3 Bucket Storage test")
runAwsKms = flag.Bool("awsKms", false, "set to run AWS KMS test")
azConnectionString = flag.String("azStorageConn", "", "connection string for Azure storage account. Required for Azure storage test.")
runAzStorage = flag.Bool("azStorage", false, "set to run Azure Storage test")
runAzKms = flag.Bool("azKms", false, "set to run Azure KMS test")
runAzHsm = flag.Bool("azHsm", false, "set to run Azure HSM test")
runGcpKms = flag.Bool("gcpKms", false, "set to run Google KMS test")
runGcpStorage = flag.Bool("gcpStorage", false, "set to run Google Storage test")
)
func TestMain(m *testing.M) {
rand.Seed(time.Now().Unix())
flag.Parse()
os.Exit(m.Run())
}
func addSuffix(s string) string {
letters := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
b := make([]rune, 5)
for i := range b {
b[i] = letters[rand.Intn(len(letters))]
}
return s + "-" + string(b)
}