Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUN-2329: QAF-migration2 #9088

Merged
merged 4 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions functional-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,3 @@ task seleniumCoreTest(type: Test){
systemProperty('spock.configuration', 'spock-configs/IncludeSeleniumCoreTestsConfig.groovy')
description = "Run Rundeck OSS Selenium Tests"
}

task tomcatTest(type: Test){
useJUnitPlatform()
systemProperty("DEFAULT_DOCKERFILE_LOCATION", "docker/file/tomcat/Dockerfile")
systemProperty('spock.configuration', 'spock-configs/IncludeAPITestsConfig.groovy')
description = "Run Rundeck OSS API Tests on a tomcat environment"
doFirst{
checkWarFile("${buildDir}/resources/test/docker/file/tomcat/data/", "rundeck-launcher.war")
}
}
gschueler marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class JobExecutionSpec extends BaseContainer {
assert responseProject.successful

def jobName1 = "xmljob"
def jobXml1 = JobUtils.generateExecForEnabledXmlTest(jobName1)
def jobXml1 = JobUtils.generateScheduledExecutionXml(jobName1)

def job1CreatedResponse = JobUtils.createJob(projectName, jobXml1, client)
assert job1CreatedResponse.successful
Expand Down Expand Up @@ -308,10 +308,10 @@ class JobExecutionSpec extends BaseContainer {
assert responseProject.successful

def jobName1 = "xmljob"
def jobXml1 = JobUtils.generateExecForEnabledXmlTest(jobName1)
def jobXml1 = JobUtils.generateScheduledExecutionXml(jobName1)

def jobName2 = "xmljob2"
def jobXml2 = JobUtils.generateExecForEnabledXmlTest(jobName2)
def jobXml2 = JobUtils.generateScheduledExecutionXml(jobName2)

def job1CreatedResponse = JobUtils.createJob(projectName, jobXml1, client)
assert job1CreatedResponse.successful
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ class JobUtils {
return client.doPostWithRawText(CREATE_JOB_ENDPOINT, "application/xml", jobDefinitionXml)
}

static def generateExecForEnabledXmlTest(String jobName){
static def generateScheduledExecutionXml(String jobName){
return "<joblist>\n" +
" <job>\n" +
" <name>${jobName}</name>\n" +
" <group>api-test</group>\n" +
" <description></description>\n" +
" <loglevel>INFO</loglevel>\n" +
" <multipleExecutions>true</multipleExecutions>\n" +
" <dispatch>\n" +
" <threadcount>1</threadcount>\n" +
" <keepgoing>true</keepgoing>\n" +
Expand All @@ -81,19 +82,20 @@ class JobUtils {
"</joblist>"
}

static def generateScheduledJobsXml(String jobname){
static def generateScheduledJobsXml(String jobname, String schedule = "<time hour='*' seconds='*' minute='0/20' />"){
return "<joblist>\n" +
" <job>\n" +
" <name>${jobname}</name>\n" +
" <group>api-test</group>\n" +
" <description></description>\n" +
" <loglevel>INFO</loglevel>\n" +
" <multipleExecutions>true</multipleExecutions>\n" +
" <dispatch>\n" +
" <threadcount>1</threadcount>\n" +
" <keepgoing>true</keepgoing>\n" +
" </dispatch>\n" +
" <schedule>\n" +
" <time hour='*' seconds='*' minute='0/20' />\n" +
" ${schedule}\n" +
" <month month='*' />\n" +
" <year year='*' />\n" +
" </schedule>\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ class ActivityPage extends BasePage {
el timeAbs
}

List<WebElement> getActivityRowsByJobName(String jobName) {
els By.xpath("//*[contains(text(),'${jobName}')]")
}

}