-
Notifications
You must be signed in to change notification settings - Fork 6
MAQEAPI
These static functions are available through the MAQEAPI class. In versions of the libraries up to and including v1.1, this variable was called TestUtils
, and the version specification was assumed to be v1
, so calling MAQEAPI.v1.runTest
would be TestUtils.runTest
.
This encapsulates the functions available and supported throughout the v1.y.z release life-cycle of the multiarch-ci-libraries.
This function serves as the main way to get a provisioning configuration that will be used in the other API functions. The function has been available since v1.0.
- Description: Usually this is just the "this" object of your test. This captures the params and environment variable defaults.
-
Type:
WorkflowScript
If you're looking to run a test on a single architecture, you can use the MAQEAPI.runTest function.
IMPORTANT NOTE
This function is broken in version v1.0. If you are on v1.0, please use runParallelMultiArchTest instead.
As of release v1.0, this function has 6 parameters. The postTest
parameter is optional in order to maintain compatibility with previous releases.
-
Description: Usually this is just the "this" object of your test. It gives the library access to pipeline steps such as
sh
. -
Type:
WorkflowScript
- Description: Specifies the arch to run the test on.
-
Type:
String
-
Valid Values:
x86_64
,ppc64le
,aarch64
,s390x
- Description: The ProvisioningConfig object. See Provisioning Configuration
-
Type:
com.redhat.ci.provisioner.ProvisioningConfig
-
Description: Closure that takes a single parameter of type
com.redhat.ci.hosts.ProvisionedHost
and wraps your test. -
Type:
Closure
-
Description: Closure that takes a two parameters. The first is of type
com.redhat.ci.hosts.ProvisionedHost
, and the second is of typeException
. This is called in the situation that your test closure fails. -
Type:
Closure
- Description: Closure that is run after the test. It takes no parameters, and does nothing by default.
-
Optional:
true
-
Type:
Closure
If you're looking to run a test on a multiple architectures in parallel, you can use the TestUtils.runParallelMultiArchTest function.
This function has 6 parameters.
-
Description: Usually this is just the "this" object of your test. It gives the library access to pipeline steps such as
sh
. -
Type:
WorkflowScript
- Description: Specifies a comma separated list of arches to run the test on.
-
Type:
List<String>
-
Valid Values:
A non-empty subset of ['x86_64', 'ppc64le', 'aarch64', 's390x']
- Description: The ProvisioningConfig object. See Provisioning Configuration
-
Type:
com.redhat.ci.provisioner.ProvisioningConfig
-
Description: Closure that takes a single parameter of type
com.redhat.ci.hosts.ProvisionedHost
and wraps your test. -
Type:
Closure
-
Description: Closure that takes a two parameters. The first is of type
com.redhat.ci.hosts.ProvisionedHost
, and the second is of typeException
. This is called in the situation that your test closure fails. -
Type:
Closure
- Description: Closure that is run after the individual arch tests. It runs in its own provisioning container. It takes no parameters, and does nothing by default.
-
Optional:
true
-
Type:
Closure
If the arch test specific functions don't solve you use case, you can use test wrapper to spin up a provisioning container and run a closure on it. The function is available in release v1.0 and above.
This function has 3 parameters.
-
Description: Usually this is just the "this" object of your test. It gives the library access to pipeline steps such as
sh
. -
Type:
WorkflowScript
- Description: The ProvisioningConfig object. See Provisioning Configuration
-
Type:
com.redhat.ci.provisioner.ProvisioningConfig
- Description: Closure that takes no parameters and wraps your test.
-
Type:
Closure
Version v1.2.0
adds a new way to define your target host. If you're looking to run a test on a single architecture, you can now use the MAQEAPI.runTest function. This function has 6 parameters. The postTest
parameter is optional to align with the other runTest functions.
-
Description: Usually this is just the "this" object of your test. It gives the library access to pipeline steps such as
sh
. -
Type:
WorkflowScript
- Description: Specifies the aspects of the TargetHost to provision.
-
Type:
TargetHost
- Description: The ProvisioningConfig object. See Provisioning Configuration
-
Type:
com.redhat.ci.provisioner.ProvisioningConfig
-
Description: Closure that takes a single parameter of type
com.redhat.ci.hosts.ProvisionedHost
and wraps your test. -
Type:
Closure
-
Description: Closure that takes a two parameters. The first is of type
com.redhat.ci.hosts.ProvisionedHost
, and the second is of typeException
. This is called in the situation that your test closure fails. -
Type:
Closure
- Description: Closure that is run after the test. It takes no parameters, and does nothing by default.
-
Optional:
true
-
Type:
Closure
Version v1.2.0
adds a new way to define a list of target hosts. If you're looking to run a test on several single hosts with differing configuration such as architecture, you can use the new version of the MAQEAPI.runTest function. This function has 6 parameters. The postTest
parameter is optional to align with the other runTest functions.
-
Description: Usually this is just the "this" object of your test. It gives the library access to pipeline steps such as
sh
. -
Type:
WorkflowScript
- Description: A list of the TargetHost objects to provision.
-
Type:
List<TargetHost>
- Description: The ProvisioningConfig object. See Provisioning Configuration
-
Type:
com.redhat.ci.provisioner.ProvisioningConfig
-
Description: Closure that takes a single parameter of type
com.redhat.ci.hosts.ProvisionedHost
and wraps your test. -
Type:
Closure
-
Description: Closure that takes a two parameters. The first is of type
com.redhat.ci.hosts.ProvisionedHost
, and the second is of typeException
. This is called in the situation that your test closure fails. -
Type:
Closure
- Description: Closure that is run after the test. It takes no parameters, and does nothing by default.
-
Optional:
true
-
Type:
Closure
Version v1.2.1
adds a wrapper for the TargetHost constructor. An issue with Jenkins has been preventing dynamically loaded shared libraries for being able to call library object constructors, so this gets around this limitation.
- Description: A map containing the keys and values of a TargetHost object.
-
Type:
Map