public class

RundeckClientTest

extends Object
java.lang.Object
   ↳ org.rundeck.api.RundeckClientTest

Class Overview

Test the RundeckClient. Uses betamax to unit-test HTTP requests without a live RunDeck instance.

Summary

Constants
String TEST_TOKEN_0 Note: to add a new test, do the following: 1) start a rundeck server, available at hostname "rundeck.local" 2) login as test or admin user, and generate a token 3) add the test token as a new TEST_TOKEN_X, and use that in your test 4) run 'mvn test', and commit the new yml file generated at src/test/resources/betamax/tapes
String TEST_TOKEN_1
String TEST_TOKEN_2
String TEST_TOKEN_3
String TEST_TOKEN_4
String TEST_TOKEN_5
String TEST_TOKEN_6
String TEST_TOKEN_7
String TEST_TOKEN_8
Fields
public Recorder recorder
Public Constructors
RundeckClientTest()
Public Methods
void abortExecution()
void abortExecutionAsUser()
void abortExecutionAsUserUnauthorized()
void apiVersionDefaultLatest()
void bulkDelete()
void bulkDeleteFailDNE()
void bulkDeleteFailUnauthorized()
void createProject()
void deleteAllJobExecutionsSuccess()
void deleteAllJobExecutionsUnauthorized()
delete executions with failure
void deleteApiToken()
get api token
void deleteExecutionFailure()
delete single execution failure (does not exist)
void deleteExecutionNullInput()
delete single execution null input
void deleteExecutionSuccess()
delete single execution success
void deleteExecutionsMixed()
delete executions mixed success
void deleteExecutionsSuccess()
delete executions with success
void deleteExecutionsUnauthorized()
delete executions with failure
void deleteJob()
delete job
void deleteJobNotFound()
delete job (DNE)
void deleteKey()
delete ssh key
void deleteProject()
void deleteProjectConfigKeyed()
void executionOutputBasic()
Execution output
void executionOutputForNode()
Execution output for a node
void executionOutputForNodeAndStep()
Execution output for a node and step
void executionOutputForStep()
Execution output for a step
void executionOutputState()
Execution output state sequence
void executionOutputStateOnly()
Execution output state sequence
void executionState()
Execution state structure
void exportProject()
void generateApiToken()
generate api token
void getApiToken()
get api token
void getExecution()
void getExecution_v11()
void getExecution_v11_buggy()
Test incorrect <result> wrapper is handled correctly
void getExecutions()
void getExecutionsPaging()
Test paging values from results
void getExecutionsV11()
void getHistory()
void getHistoryExcludeJoblist()
void getHistoryJoblist()
void getHistoryUser()
void getKeyData_private()
get ssh key data
void getKeyData_public()
get ssh key data
void getKey_private()
get ssh key
void getKey_public()
get ssh key
void getProjectConfig()
void getProjectConfigKeyed()
void getProjectConfigKeyedDNE()
void getProjects()
void importJobsContextProject()
Import jobs, xml contains project context
void importJobsNoProject()
Import jobs, xml no project defined
void importJobsProjectParam()
Import jobs, using project parameter
void importJobsProjectParamOverride()
Import jobs, project parameter overrides xml
void importJobsProjectParamV7()
Import jobs, project parameter v7 doesn' use parameter
void importJobsUUIDParamPreserveV9()
Import jobs, project parameter v7 doesn' use parameter
void importJobsUUIDParamRemoveV9()
Import jobs, project parameter v7 doesn' use parameter
void importProjectFailure()
void importProjectSuccess()
void listApiTokens()
list api tokens all
void listApiTokens_user()
list api tokens for user
void listKeyDirectory()
list directory
void listKeyDirectoryRoot()
list root
void runningExecutionsV8()
Running executions for all projects using API v8, which queries for project list and then individually queries each project's now running
void runningExecutionsV9()
Running executions for all projects using API v9
void setProjectConfig()
void setProjectConfigKeyed()
void setUp()
void storeKey_private()
Store ssh key
void storeKey_public()
Store ssh key
void triggerAdhocCommand()
void triggerAdhocCommandAsUser()
void triggerAdhocCommandAsUserUnauthorized()
void triggerAdhocCommand_v11()
void triggerAdhocCommand_v11_buggy()
void triggerAdhocScript()
void triggerAdhocScriptAsUser()
void triggerAdhocScriptAsUserUnauthorized()
void triggerAdhocScriptInpterpreter()
void triggerAdhocScript_v11()
Handle v11 response without <result> wrapper
void triggerAdhocScript_v11_buggy()
Handle incorrect <result> wrapper for v11 response
void triggerJobAsUser()
void triggerJobAsUserUnauthorized()
void triggerJobBasic()
void triggerJobBasic_v11()
API v11 request to trigger job, with expected xml response without <result> wrapper
void triggerJobBasic_v11_patch()
Response for API v11 incorrectly includes <result>, but we should handle this case
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String TEST_TOKEN_0

Note: to add a new test, do the following: 1) start a rundeck server, available at hostname "rundeck.local" 2) login as test or admin user, and generate a token 3) add the test token as a new TEST_TOKEN_X, and use that in your test 4) run 'mvn test', and commit the new yml file generated at src/test/resources/betamax/tapes

See Also
  • createClient(String)
Constant Value: "PVnN5K3OPc5vduS3uVuVnEsD57pDC5pd"

public static final String TEST_TOKEN_1

Constant Value: "0UUNkeRp4d58EDeCs7S6UdODp334DvK9"

public static final String TEST_TOKEN_2

Constant Value: "PP4s4SdCRO6KUoNPd1D303Dc304ORN87"

public static final String TEST_TOKEN_3

Constant Value: "9RdEosesKP3se4oV9EKOd4s3RUeUS3ON"

public static final String TEST_TOKEN_4

Constant Value: "sN5RRSNvu15DnV6EcNDdc2CkdPcv3s32"

public static final String TEST_TOKEN_5

Constant Value: "C3O6d5O98Kr6Dpv71sdE4ERdCuU12P6d"

public static final String TEST_TOKEN_6

Constant Value: "Do4d3NUD5DKk21DR4sNK755RcPk618vn"

public static final String TEST_TOKEN_7

Constant Value: "8Dp9op111ER6opsDRkddvE86K9sE499s"

public static final String TEST_TOKEN_8

Constant Value: "GG7uj1y6UGahOs7QlmeN2sIwz1Y2j7zI"

Fields

public Recorder recorder

Public Constructors

public RundeckClientTest ()

Public Methods

public void abortExecution ()

Throws
Exception

public void abortExecutionAsUser ()

Throws
Exception

public void abortExecutionAsUserUnauthorized ()

Throws
Exception

public void apiVersionDefaultLatest ()

public void bulkDelete ()

Throws
Exception

public void bulkDeleteFailDNE ()

Throws
Exception

public void bulkDeleteFailUnauthorized ()

Throws
Exception

public void createProject ()

Throws
Exception

public void deleteAllJobExecutionsSuccess ()

Throws
Exception

public void deleteAllJobExecutionsUnauthorized ()

delete executions with failure

Throws
Exception

public void deleteApiToken ()

get api token

Throws
Exception

public void deleteExecutionFailure ()

delete single execution failure (does not exist)

Throws
Exception

public void deleteExecutionNullInput ()

delete single execution null input

Throws
Exception

public void deleteExecutionSuccess ()

delete single execution success

Throws
Exception

public void deleteExecutionsMixed ()

delete executions mixed success

Throws
Exception

public void deleteExecutionsSuccess ()

delete executions with success

Throws
Exception

public void deleteExecutionsUnauthorized ()

delete executions with failure

Throws
Exception

public void deleteJob ()

delete job

Throws
Exception

public void deleteJobNotFound ()

delete job (DNE)

Throws
Exception

public void deleteKey ()

delete ssh key

Throws
Exception

public void deleteProject ()

Throws
Exception

public void deleteProjectConfigKeyed ()

Throws
Exception

public void executionOutputBasic ()

Execution output

Throws
Exception

public void executionOutputForNode ()

Execution output for a node

Throws
Exception

public void executionOutputForNodeAndStep ()

Execution output for a node and step

Throws
Exception

public void executionOutputForStep ()

Execution output for a step

Throws
Exception

public void executionOutputState ()

Execution output state sequence

Throws
Exception

public void executionOutputStateOnly ()

Execution output state sequence

Throws
Exception

public void executionState ()

Execution state structure

Throws
Exception

public void exportProject ()

Throws
Exception

public void generateApiToken ()

generate api token

Throws
Exception

public void getApiToken ()

get api token

Throws
Exception

public void getExecution ()

Throws
Exception

public void getExecution_v11 ()

Throws
Exception

public void getExecution_v11_buggy ()

Test incorrect <result> wrapper is handled correctly

Throws
Exception

public void getExecutions ()

Throws
Exception

public void getExecutionsPaging ()

Test paging values from results

Throws
Exception

public void getExecutionsV11 ()

Throws
Exception

public void getHistory ()

Throws
Exception

public void getHistoryExcludeJoblist ()

Throws
Exception

public void getHistoryJoblist ()

Throws
Exception

public void getHistoryUser ()

Throws
Exception

public void getKeyData_private ()

get ssh key data

Throws
Exception

public void getKeyData_public ()

get ssh key data

Throws
Exception

public void getKey_private ()

get ssh key

Throws
Exception

public void getKey_public ()

get ssh key

Throws
Exception

public void getProjectConfig ()

Throws
Exception

public void getProjectConfigKeyed ()

Throws
Exception

public void getProjectConfigKeyedDNE ()

Throws
Exception

public void getProjects ()

Throws
Exception

public void importJobsContextProject ()

Import jobs, xml contains project context

Throws
Exception

public void importJobsNoProject ()

Import jobs, xml no project defined

Throws
Exception

public void importJobsProjectParam ()

Import jobs, using project parameter

Throws
Exception

public void importJobsProjectParamOverride ()

Import jobs, project parameter overrides xml

Throws
Exception

public void importJobsProjectParamV7 ()

Import jobs, project parameter v7 doesn' use parameter

Throws
Exception

public void importJobsUUIDParamPreserveV9 ()

Import jobs, project parameter v7 doesn' use parameter

Throws
Exception

public void importJobsUUIDParamRemoveV9 ()

Import jobs, project parameter v7 doesn' use parameter

Throws
Exception

public void importProjectFailure ()

Throws
Exception

public void importProjectSuccess ()

Throws
Exception

public void listApiTokens ()

list api tokens all

Throws
Exception

public void listApiTokens_user ()

list api tokens for user

Throws
Exception

public void listKeyDirectory ()

list directory

Throws
Exception

public void listKeyDirectoryRoot ()

list root

Throws
Exception

public void runningExecutionsV8 ()

Running executions for all projects using API v8, which queries for project list and then individually queries each project's now running

Throws
Exception

public void runningExecutionsV9 ()

Running executions for all projects using API v9

Throws
Exception

public void setProjectConfig ()

Throws
Exception

public void setProjectConfigKeyed ()

Throws
Exception

public void setUp ()

Throws
Exception

public void storeKey_private ()

Store ssh key

Throws
Exception

public void storeKey_public ()

Store ssh key

Throws
Exception

public void triggerAdhocCommand ()

Throws
Exception

public void triggerAdhocCommandAsUser ()

Throws
Exception

public void triggerAdhocCommandAsUserUnauthorized ()

Throws
Exception

public void triggerAdhocCommand_v11 ()

Throws
Exception

public void triggerAdhocCommand_v11_buggy ()

Throws
Exception

public void triggerAdhocScript ()

Throws
Exception

public void triggerAdhocScriptAsUser ()

Throws
Exception

public void triggerAdhocScriptAsUserUnauthorized ()

Throws
Exception

public void triggerAdhocScriptInpterpreter ()

Throws
Exception

public void triggerAdhocScript_v11 ()

Handle v11 response without <result> wrapper

Throws
Exception

public void triggerAdhocScript_v11_buggy ()

Handle incorrect <result> wrapper for v11 response

Throws
Exception

public void triggerJobAsUser ()

Throws
Exception

public void triggerJobAsUserUnauthorized ()

Throws
Exception

public void triggerJobBasic ()

Throws
Exception

public void triggerJobBasic_v11 ()

API v11 request to trigger job, with expected xml response without <result> wrapper

Throws
Exception

public void triggerJobBasic_v11_patch ()

Response for API v11 incorrectly includes <result>, but we should handle this case

Throws
Exception