Documentation
¶
Overview ¶
Package resource is used to manage which tests shall be executed. Tests can specify which resources they require. If such a resource is not available at runtime, the test will be skipped. The availability of resources is determined by the presence of an environment variable that doesn't evaluate to false (e.g. "0", "no", "false"). See strconv.ParseBool for more information what evaluates to false.
Index ¶
Constants ¶
View Source
const ( // UnitTest refers to the name of the environment variable that is used to // specify that unit tests shall be run. Unless this environment variable // is explicitly set to evaluate to false ("0", "no", or "false"), unit // tests are executed all the time. UnitTest = "F8_RESOURCE_UNIT_TEST" // Database refers to the name of the environment variable that is used to // specify that test can be run that require a database. Database = "F8_RESOURCE_DATABASE" // Remote refers to the name of the environment variable that is used to // specify that test can be run that require availability of some remote servers such as Keycloak. Remote = "F8_RESOURCE_REMOTE" // StSkipReasonValueFalse is the skip message for tests when an environment variable is present but evaluates to false. StSkipReasonValueFalse = "Skipping test because environment variable %s evaluates to false: %s" // StSkipReasonNotSet is the skip message for tests when an environment is not present. StSkipReasonNotSet = "Skipping test because environment variable %s is no set." // StSkipReasonParseError is the error message for tests where we're unable to parse the required // environment variable as a boolean value. StSkipReasonParseError = "Unable to parse value of environment variable %s as bool: %s" )
Variables ¶
This section is empty.
Functions ¶
func IsGiven ¶
IsGiven works just like Require but instead of skipping the test the return value of this function is just false.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.