diff --git a/tests/jenkins/TestCreateGithubIssue.groovy b/tests/jenkins/TestCreateGithubIssue.groovy index fb1f8d6d..8bb7541d 100644 --- a/tests/jenkins/TestCreateGithubIssue.groovy +++ b/tests/jenkins/TestCreateGithubIssue.groovy @@ -65,7 +65,7 @@ class TestCreateGithubIssue extends BuildPipelineTest { helper.addShMock("""gh issue list --repo https://github.com/opensearch-project/opensearch-build -S "Test GH issue title in:title is:closed closed:>=2023-10-24" --json number --jq '.[0].number'""") { script -> return [stdout: "", exitValue: 0] } - super.testPipeline('tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile') + runScript('tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile') assertThat(getCommands('println', ''), hasItem("Creating new issue")) assertThat(getCommands('sh', 'script'), hasItem("{script=gh issue create --title \"Test GH issue title\" --body \"Test GH issue body\" --label \"label101\" --label \"untriaged\" --repo https://github.com/opensearch-project/opensearch-build, returnStdout=true}")) } @@ -90,7 +90,7 @@ class TestCreateGithubIssue extends BuildPipelineTest { helper.addShMock("""gh label list --repo https://github.com/opensearch-project/opensearch-build -S "label101" --json name --jq '.[0].name'""") { script -> return [stdout: "no labels in opensearch-project/opensearch-build matched your search", exitValue: 0] } - super.testPipeline('tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile') + runScript('tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile') assertThat(getCommands('println', ''), hasItem("Creating new issue")) assertThat(getCommands('sh', 'script'), hasItem("{script=gh label create label101 --repo https://github.com/opensearch-project/opensearch-build, returnStdout=true}")) assertThat(getCommands('sh', 'script'), hasItem("{script=gh issue create --title \"Test GH issue title\" --body \"Test GH issue body\" --label \"label101\" --label \"untriaged\" --repo https://github.com/opensearch-project/opensearch-build, returnStdout=true}")) @@ -113,7 +113,7 @@ class TestCreateGithubIssue extends BuildPipelineTest { helper.addShMock("""gh issue list --repo https://github.com/opensearch-project/opensearch-build -S "Test GH issue title in:title is:closed closed:>=2023-10-24" --json number --jq '.[0].number'""") { script -> return [stdout: "22", exitValue: 0] } - super.testPipeline('tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile') + runScript('tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile') assertThat(getCommands('println', ''), hasItem("Re-opening a recently closed issue and commenting on it")) assertThat(getCommands('sh', 'script'), hasItem("{script=gh issue reopen --repo https://github.com/opensearch-project/opensearch-build 22, returnStdout=true}")) assertThat(getCommands('sh', 'script'), hasItem("{script=gh issue comment 22 --repo https://github.com/opensearch-project/opensearch-build --body \"Test GH issue body\", returnStdout=true}")) @@ -128,7 +128,7 @@ class TestCreateGithubIssue extends BuildPipelineTest { "label101", "5" )) - super.testPipeline('tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile') + runScript('tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile') assertThat(getCommands('sh', 'script'), hasItem("{script=date -d \"5 days ago\" +'%Y-%m-%d', returnStdout=true}")) }