Package com.atlassian.jira.webtests.util
Class LocalTestEnvironmentData
java.lang.Object
com.atlassian.jira.webtests.util.AbstractEnvironmentData
com.atlassian.jira.webtests.util.LocalTestEnvironmentData
- All Implemented Interfaces:
com.atlassian.jira.testkit.client.JIRAEnvironmentData
,JIRAEnvironmentData
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLocalTestEnvironmentData
(String xmlDataLocation) LocalTestEnvironmentData
(Properties properties, String xmlDataLocation) -
Method Summary
Modifier and TypeMethodDescriptiongetProperty
(String key) Returns a property from the test environment.Returns the tenant to run requests on.Returns a directory that can be used by the func tests whenever file operations need to be done.static Properties
loadProperties
(String key, String def) boolean
Whether a dummy tenant should be created after the tenant is created.Methods inherited from class com.atlassian.jira.webtests.util.AbstractEnvironmentData
getEnvironmentProperty, getEnvironmentProperty, getReleaseInfo, getSingleTestClass, isAllTests, isBlame, isBundledPluginsOnly, isSingleNamedTest, isTpmLdapTests
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
LocalTestEnvironmentData
public LocalTestEnvironmentData() -
LocalTestEnvironmentData
-
LocalTestEnvironmentData
-
-
Method Details
-
loadProperties
-
getProperty
Description copied from interface:JIRAEnvironmentData
Returns a property from the test environment. If the property is not available it returns null.- Specified by:
getProperty
in interfacecom.atlassian.jira.testkit.client.JIRAEnvironmentData
- Specified by:
getProperty
in interfaceJIRAEnvironmentData
- Overrides:
getProperty
in classAbstractEnvironmentData
- Parameters:
key
- the property key- Returns:
- a property from the test environment, or null if not available.
-
getContext
-
getTenant
Description copied from interface:JIRAEnvironmentData
Returns the tenant to run requests on. This triggers X-Atlassian-Tenant to be set for each request to this value. If null, no header is set.- Specified by:
getTenant
in interfacecom.atlassian.jira.testkit.client.JIRAEnvironmentData
- Specified by:
getTenant
in interfaceJIRAEnvironmentData
- Overrides:
getTenant
in classAbstractEnvironmentData
- Returns:
- The tenant
-
shouldCreateDummyTenant
public boolean shouldCreateDummyTenant()Description copied from interface:JIRAEnvironmentData
Whether a dummy tenant should be created after the tenant is created. This is useful for picking up issues where tenant specific state is statically referenced, so the most recently created tenant is fine, but older tenants fail. The dummy tenant will be fine, but the tests will be run against the older tenant.- Specified by:
shouldCreateDummyTenant
in interfacecom.atlassian.jira.testkit.client.JIRAEnvironmentData
- Specified by:
shouldCreateDummyTenant
in interfaceJIRAEnvironmentData
- Overrides:
shouldCreateDummyTenant
in classAbstractEnvironmentData
- Returns:
- true if a dummy tenant should be created after the tenant is created.
-
getBaseUrl
-
getXMLDataLocation
-
getWorkingDirectory
Description copied from interface:JIRAEnvironmentData
Returns a directory that can be used by the func tests whenever file operations need to be done.This directory is guaranteed to not be used by other func test instances simultaneously running on the same machine in Bamboo.
This should return a canonical file name (ie an absolute file name, without any '..' parts in it).
- Returns:
- a directory that can be used by the func tests whenever file operations need to be done.
- See Also:
-
getJIRAHomeLocation
- Returns:
- a directory that can be used by the func tests whenever file operations need to be done.
-
getEdition
- Specified by:
getEdition
in classAbstractEnvironmentData
-