Documentation
¶
Index ¶
- Constants
- type IntegrationTestSuite
- func (s *IntegrationTestSuite) AfterTest(suiteName, testName string)
- func (s *IntegrationTestSuite) BeforeTest(suiteName, testName string)
- func (s *IntegrationTestSuite) EnsureAzuriteEnv()
- func (s *IntegrationTestSuite) SetupSuite()
- func (s *IntegrationTestSuite) StdinWriteAndClose(b []byte) (int, error)
- type TestEnv
Constants ¶
const ( AzureStorageAccountVar string = "AZURE_STORAGE_ACCOUNT" AzureStorageKeyVar string = "AZURE_STORAGE_KEY" AzuriteBlobEndpointURLVar string = "AZURITE_BLOB_ENDPOINT_URL" AzuriteWellKnownKey string = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" AzuriteWellKnownAccount string = "devstoreaccount1" AzuriteWellKnownBlobEndpointURL string = "http://127.0.0.1:10000/devstoreaccount1/" AzuriteResourceGroup string = "azurite-emulator" AzuriteSubscription string = "azurite-emulator" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntegrationTestSuite ¶
type IntegrationTestSuite struct {
suite.Suite
Env TestEnv
// contains filtered or unexported fields
}
IntegrationTestSuite base for all tests It's an integration test because we don't require a specifically deployed instance, we rely on the availability of prod.
func (*IntegrationTestSuite) AfterTest ¶
func (s *IntegrationTestSuite) AfterTest(suiteName, testName string)
AfterTest is run after the test has executed
Currently used to print useful information for failing tests
func (*IntegrationTestSuite) BeforeTest ¶
func (s *IntegrationTestSuite) BeforeTest(suiteName, testName string)
BeforeTest is run before the test
It gets the correct suite wide test environment As well as makes a test specific test tenant
func (*IntegrationTestSuite) EnsureAzuriteEnv ¶ added in v0.1.0
func (s *IntegrationTestSuite) EnsureAzuriteEnv()
EnsureAzuriteEnv ensures the environment variables for azurite are set But respects any that are already set
func (*IntegrationTestSuite) SetupSuite ¶
func (s *IntegrationTestSuite) SetupSuite()
func (*IntegrationTestSuite) StdinWriteAndClose ¶
func (s *IntegrationTestSuite) StdinWriteAndClose(b []byte) (int, error)
StdinWriteAndClose writes the provided bytes to std in and closes the write side of pipe It should be called to provided input for any test that read stdin. os.Stdin is set to the read side of the pipe in BeforeTest, and restored in AfterTest.
type TestEnv ¶
type TestEnv struct {
// FQDN of the deployment to test against
FQDN string
VerifiableDataURL string
AzuriteVerifiableDataURL string
// azure blob storage variable
MerklelogAccountName string
MerklelogURL string
PublicTenantId string
SynsationTenantId string
MerkelogURLPrefix string
PublicKey string
UnknownTenantId string
}
func NewTestEnv ¶
NewTestEnv generates retrieves values from the environment.