Skip to content

Commit

Permalink
adjust tests to new var name, fix timeout stepIT (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
MxEh-TT committed Sep 21, 2023
1 parent 17ce705 commit 176745e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ETContainerTest extends ContainerTest {
String script = """
node {
withEnv(['ET_API_HOSTNAME=${etContainer.host}', 'ET_API_PORT=${etContainer.getMappedPort(ET_PORT)}']) {
ttCheckPackage filePath: 'test.pkg'
ttCheckPackage testCasePath: 'test.pkg'
}
}
""".stripIndent()
Expand All @@ -67,7 +67,7 @@ class ETContainerTest extends ContainerTest {
String script = """
node {
withEnv(['ET_API_HOSTNAME=${etContainer.host}', 'ET_API_PORT=${etContainer.getMappedPort(ET_PORT)}']) {
ttCheckPackage filePath: 'testDoesNotExist.pkg'
ttCheckPackage testCasePath: 'testDoesNotExist.pkg'
}
}
""".stripIndent()
Expand All @@ -92,7 +92,7 @@ class ETContainerTest extends ContainerTest {
String script = """
node {
withEnv(['ET_API_HOSTNAME=${etContainer.host}', 'ET_API_PORT=${etContainer.getMappedPort(ET_PORT)}']) {
ttCheckPackage filePath: 'invalid_package_desc.pkg'
ttCheckPackage testCasePath: 'invalid_package_desc.pkg'
}
}
""".stripIndent()
Expand All @@ -117,7 +117,7 @@ class ETContainerTest extends ContainerTest {
String script = """
node {
withEnv(['ET_API_HOSTNAME=${etContainer.host}', 'ET_API_PORT=${etContainer.getMappedPort(ET_PORT)}']) {
ttCheckPackage filePath: 'invalid_package_desc.prj'
ttCheckPackage testCasePath: 'invalid_package_desc.prj'
}
}
""".stripIndent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class CheckPackageStepIT extends IntegrationTestBase {
def 'Run pipeline'() {
given:
WorkflowJob job = jenkins.createProject(WorkflowJob.class, 'pipeline')
job.setDefinition(new CpsFlowDefinition("node { ttCheckPackage 'test.pkg' }", true))
job.setDefinition(new CpsFlowDefinition("node { " +
"ttCheckPackage testCasePath: 'test.pkg', executionConfig: [timeout: 5]}", true))
expect:
WorkflowRun run = jenkins.assertBuildStatus(Result.FAILURE, job.scheduleBuild2(0).get())
jenkins.assertLogContains("Executing Package Checks for", run)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ class RunPackageStepIT extends IntegrationTestBase {
def 'Run pipeline with package check'(){
given:
WorkflowJob job = jenkins.createProject(WorkflowJob.class, 'pipeline')
job.setDefinition(new CpsFlowDefinition(
"node { ttRunPackage testCasePath:'test.pkg', executionConfig: [executePackageCheck: true]}", true)
job.setDefinition(new CpsFlowDefinition("node { " +
"ttRunPackage testCasePath:'test.pkg', executionConfig: [executePackageCheck: true, timeout: 5]}",
true)
)
expect:
WorkflowRun run = jenkins.assertBuildStatus(Result.FAILURE, job.scheduleBuild2(0).get())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ class RunProjectStepIT extends IntegrationTestBase {
def 'Run pipeline with package check'() {
given:
WorkflowJob job = jenkins.createProject(WorkflowJob.class, 'pipeline')
job.setDefinition(new CpsFlowDefinition(
"node { ttRunProject testCasePath: 'test.prj', executionConfig: [executePackageCheck: true]}", true)
job.setDefinition(new CpsFlowDefinition("node { " +
"ttRunProject testCasePath: 'test.prj', executionConfig: [executePackageCheck: true, timeout: 5]}",
true)
)
expect:
WorkflowRun run = jenkins.assertBuildStatus(Result.FAILURE, job.scheduleBuild2(0).get())
Expand Down

0 comments on commit 176745e

Please sign in to comment.