com.atlassian.jira.webtests.util
Class TenantOverridingEnvironmentData

java.lang.Object
  extended by com.atlassian.jira.webtests.util.TenantOverridingEnvironmentData
All Implemented Interfaces:
com.atlassian.jira.testkit.client.JIRAEnvironmentData

public class TenantOverridingEnvironmentData
extends Object
implements JIRAEnvironmentData

Since:
v4.3

Constructor Summary
TenantOverridingEnvironmentData(String tenant, JIRAEnvironmentData environmentData)
           
 
Method Summary
 URL getBaseUrl()
           
 String getContext()
           
 File getJIRAHomeLocation()
          Deprecated. 
 String getProperty(String key)
          Returns a property from the test environment.
 String getReleaseInfo()
          This is the expected release information shown under "Installation Type" on the sysinfo page.
 Class<? extends junit.framework.TestCase> getSingleTestClass()
          Run a specifically named test instead of the normal suite
 String getTenant()
          Returns the tenant to run requests on.
 File getWorkingDirectory()
          Returns a directory that can be used by the func tests whenever file operations need to be done.
 File getXMLDataLocation()
           
 boolean isAllTests()
           
 boolean isBlame()
          Experimental Judge Judy build.
 boolean isBundledPluginsOnly()
           
 boolean isSingleNamedTest()
           
 boolean isTpmLdapTests()
          A special suite of tests that connect to an LDAP server on LabManager (TPM).
 boolean shouldCreateDummyTenant()
          Whether a dummy tenant should be created after the tenant is created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TenantOverridingEnvironmentData

public TenantOverridingEnvironmentData(String tenant,
                                       JIRAEnvironmentData environmentData)
Method Detail

getTenant

public String 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 interface com.atlassian.jira.testkit.client.JIRAEnvironmentData
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 interface com.atlassian.jira.testkit.client.JIRAEnvironmentData
Returns:
true if a dummy tenant should be created after the tenant is created.

getBaseUrl

public URL getBaseUrl()
Specified by:
getBaseUrl in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData

getXMLDataLocation

public File getXMLDataLocation()
Specified by:
getXMLDataLocation in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData

getWorkingDirectory

public File 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).

Specified by:
getWorkingDirectory in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData
Returns:
a directory that can be used by the func tests whenever file operations need to be done.
See Also:
File.getCanonicalFile()

getJIRAHomeLocation

@Deprecated
public File getJIRAHomeLocation()
Deprecated. 

Specified by:
getJIRAHomeLocation in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData
Returns:
a directory that can be used by the func tests whenever file operations need to be done.

getReleaseInfo

public String getReleaseInfo()
Description copied from interface: JIRAEnvironmentData
This is the expected release information shown under "Installation Type" on the sysinfo page.

Specified by:
getReleaseInfo in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData
Returns:
the expected release information shown under "Installation Type" on the sysinfo page.

isBundledPluginsOnly

public boolean isBundledPluginsOnly()
Specified by:
isBundledPluginsOnly in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData

isAllTests

public boolean isAllTests()
Specified by:
isAllTests in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData

isSingleNamedTest

public boolean isSingleNamedTest()
Specified by:
isSingleNamedTest in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData

getSingleTestClass

public Class<? extends junit.framework.TestCase> getSingleTestClass()
Description copied from interface: JIRAEnvironmentData
Run a specifically named test instead of the normal suite

Specified by:
getSingleTestClass in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData

isTpmLdapTests

public boolean isTpmLdapTests()
Description copied from interface: JIRAEnvironmentData
A special suite of tests that connect to an LDAP server on LabManager (TPM).

Specified by:
isTpmLdapTests in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData
Returns:
true if we are running the TPM LDAP tests only.

isBlame

public boolean isBlame()
Description copied from interface: JIRAEnvironmentData
Experimental Judge Judy build.

Specified by:
isBlame in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData
Returns:
true if we are running the Judge Judy tests.

getProperty

public String getProperty(String key)
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 interface com.atlassian.jira.testkit.client.JIRAEnvironmentData
Parameters:
key - the property key
Returns:
a property from the test environment, or null if not available.

getContext

public String getContext()
Specified by:
getContext in interface com.atlassian.jira.testkit.client.JIRAEnvironmentData


Copyright © 2002-2014 Atlassian. All Rights Reserved.