@Mojo(name="test") public class TestReleaseMojo extends AbstractSingleReleaseMojo
Constructor and Description |
---|
TestReleaseMojo()
Creates a new
TestReleaseMojo . |
Modifier and Type | Method and Description |
---|---|
void |
addReleaseTestListener(ReleaseTestListener listener)
Adds a
ReleaseTestListener that will be notified when
the tests complete. |
protected void |
execute(Callable<ReleaseManager> releaseManagerCallable)
|
boolean |
getCleanup()
Returns
true if test Pods should be deleted after the
tests complete. |
ReleaseTestListener[] |
getReleaseTestListeners()
Invokes the
getReleaseTestListenersList() method and
converts its return
value to an array. |
List<ReleaseTestListener> |
getReleaseTestListenersList()
|
long |
getTimeout()
Returns the timeout value, in seconds, for Kubernetes operations.
|
void |
removeReleaseTestListener(ReleaseTestListener listener)
Removes a
ReleaseTestListener from this TestReleaseMojo . |
void |
setCleanup(boolean cleanup)
Sets whether test Pods should be deleted after the
tests complete.
|
void |
setReleaseTestListenersList(List<ReleaseTestListener> releaseTestListeners)
|
void |
setTimeout(long timeout)
Sets the timeout value, in seconds, for Kubernetes operations.
|
getReleaseName, setReleaseName, validateReleaseName
createClient, createReleaseManager, createTiller, execute, getClientConfiguration, getSkip, getTillerLabels, getTillerNamespace, getTillerPort, setClientConfiguration, setSkip, setTillerLabels, setTillerNamespace, setTillerPort, validateNamespace
getLog, getPluginContext, setLog, setPluginContext
public TestReleaseMojo()
TestReleaseMojo
.protected void execute(Callable<ReleaseManager> releaseManagerCallable) throws Exception
ReleaseManager
available from the supplied Callable
.
This implementation runs tests against a release.
execute
in class AbstractReleaseMojo
releaseManagerCallable
- the Callable
that will
provide a ReleaseManager
; must not be null
Exception
- if an error occurspublic boolean getCleanup()
true
if test Pods should be deleted after the
tests complete.true
if test Pods should be deleted after the
tests complete; false
otherwisesetCleanup(boolean)
public void setCleanup(boolean cleanup)
cleanup
- if true
, test Pods will be deleted after
the tests completegetCleanup()
public long getTimeout()
setTimeout(long)
public void setTimeout(long timeout)
timeout
- the timeout value, in seconds, for Kubernetes
operationsgetTimeout()
public void addReleaseTestListener(ReleaseTestListener listener)
ReleaseTestListener
that will be notified when
the tests complete.listener
- the ReleaseTestListener
to add; may be
null
in which case no action will be takenremoveReleaseTestListener(ReleaseTestListener)
,
getReleaseTestListenersList()
public void removeReleaseTestListener(ReleaseTestListener listener)
ReleaseTestListener
from this TestReleaseMojo
.listener
- the ReleaseTestListener
to remove; may be
null
in which case no action will be takenaddReleaseTestListener(ReleaseTestListener)
,
getReleaseTestListenersList()
public ReleaseTestListener[] getReleaseTestListeners()
getReleaseTestListenersList()
method and
converts its return
value to an array.
This method never returns null
.
Overrides of this method must not return null
.
null
array of ReleaseTestListener
sgetReleaseTestListenersList()
public List<ReleaseTestListener> getReleaseTestListenersList()
List
of ReleaseTestListener
s whose
elements will be notified when
the tests complete.
This method may return null
.
Overrides of this method are permitted to return null
.
List
of ReleaseTestListener
s, or null
setReleaseTestListenersList(List)
,
addReleaseTestListener(ReleaseTestListener)
,
removeReleaseTestListener(ReleaseTestListener)
public void setReleaseTestListenersList(List<ReleaseTestListener> releaseTestListeners)
releaseTestListeners
- the List
of ReleaseTestListener
s whose
elements will be notified when
the tests complete; may be null
getReleaseTestListenersList()
,
addReleaseTestListener(ReleaseTestListener)
,
removeReleaseTestListener(ReleaseTestListener)
Copyright © 2017–2018, microBean. All rights reserved.