Documentation
¶
Index ¶
- Variables
- func AtlasServerURL() string
- func CloudAPIKey() string
- func CloudAdminAPIKey() string
- func CloudAdminUsername() string
- func CloudAtlasClusterCount() int
- func CloudAtlasDataLakeCount() int
- func CloudGroupID() string
- func CloudGroupName() string
- func CloudUsername() string
- func ExpiredAccessToken() string
- func MustSkipf(t *testing.T, format string, args ...interface{})
- func NewTempDir(name string) (string, func(), error)
- func RealmServerURL() string
- func SetupHomeDir(newHome string) (string, func())
Constants ¶
This section is empty.
Variables ¶
var SkipUnlessAtlasServerRunning = func() func(t *testing.T) { return func(t *testing.T) { if atlasServerRunning { return } skipUnlessAtlasServerCalled = true if atlasServerNotRunning { MustSkipf(t, "Atlas server not running at %s", AtlasServerURL()) return } client := atlas.NewAuthClient(AtlasServerURL(), user.Credentials{CloudUsername(), CloudAPIKey()}) if err := client.Status(); err != nil { atlasServerNotRunning = true MustSkipf(t, "Atlas server not running at %s", AtlasServerURL()) return } atlasServerRunning = true } }()
SkipUnlessAtlasServerRunning skips tests if there is no Atlas server running at the configured testing url (see: AtlasServerURL())
var SkipUnlessExpiredAccessTokenPresent = func() func(t *testing.T) { return func(t *testing.T) { skipUnlessExpiredAccessTokenCalled = true if ExpiredAccessToken() == "" { MustSkipf(t, "expired access token not detected in environment") } return } }()
SkipUnlessExpiredAccessTokenPresent skips tests if there is no expired access token set as an environment URL
var SkipUnlessRealmServerRunning = func() func(t *testing.T) { return func(t *testing.T) { if realmServerRunning { return } skipUnlessRealmServerCalled = true if realmServerNotRunning { MustSkipf(t, "Realm server not running at %s", RealmServerURL()) return } client := realm.NewClient(RealmServerURL()) if err := client.Status(); err != nil { realmServerNotRunning = true MustSkipf(t, "Realm server not running at %s", RealmServerURL()) return } realmServerRunning = true } }()
SkipUnlessRealmServerRunning skips tests if there is no Realm server running at the configured testing url (see: RealmServerURL())
Functions ¶
func AtlasServerURL ¶
func AtlasServerURL() string
AtlasServerURL returns the Atlas server url to use for testing
func CloudAPIKey ¶
func CloudAPIKey() string
CloudAPIKey returns the Cloud api key to use for testing
func CloudAdminAPIKey ¶
func CloudAdminAPIKey() string
CloudAdminAPIKey returns the Cloud admin api key
func CloudAdminUsername ¶
func CloudAdminUsername() string
CloudAdminUsername returns the Cloud admin username
func CloudAtlasClusterCount ¶
func CloudAtlasClusterCount() int
CloudAtlasClusterCount returns the count of clusters to use for testing
func CloudAtlasDataLakeCount ¶
func CloudAtlasDataLakeCount() int
CloudAtlasDataLakeCount returns the count of clusters to use for testing
func CloudGroupID ¶
func CloudGroupID() string
CloudGroupID returns the Cloud group id to use for testing
func CloudGroupName ¶
func CloudGroupName() string
CloudGroupName returns the Cloud group id to use for testing
func CloudUsername ¶
func CloudUsername() string
CloudUsername returns the Cloud username to use for testing
func ExpiredAccessToken ¶
func ExpiredAccessToken() string
ExpiredAccessToken returns an expired access token to use for testing
func NewTempDir ¶
NewTempDir constructs a new temporary directory and returns the directory name along with a cleanup function or any error that occurred during the process
func RealmServerURL ¶
func RealmServerURL() string
RealmServerURL returns the Realm server url to use for testing
func SetupHomeDir ¶
SetupHomeDir sets up the $HOME directory for a test and returns the directory name along with a reset function
Types ¶
This section is empty.