Skip to content

Commit

Permalink
add additional test to verify if the needed sh script in place
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Lu <chunglu@amazon.com>
  • Loading branch information
jordarlu committed Oct 20, 2022
1 parent a1d6cb0 commit fdb2ee6
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/jenkins/TestReleaseNotesCheck.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import jenkins.tests.BuildPipelineTest
import org.junit.Before
import org.junit.Test
import static com.lesfurets.jenkins.unit.global.lib.LibraryConfiguration.library
import static com.lesfurets.jenkins.unit.global.lib.GitSource.gitSource
import static com.lesfurets.jenkins.unit.MethodCall.callArgsToString
import static org.assertj.core.api.Assertions.assertThat

class TestReleaseNotesCheck extends BuildPipelineTest {

Expand Down Expand Up @@ -40,4 +41,17 @@ class TestReleaseNotesCheck extends BuildPipelineTest {
super.testPipeline("jenkins/release-notes-check/release-notes-check.jenkinsfile",
"tests/jenkins/jenkinsjob-regression-files/release-notes-check/release-notes-check.jenkinsfile")
}

@Test
public void releaseNoteExecuteWithoutErrors() {
runScript("jenkins/release-notes-check/release-notes-check.jenkinsfile")

assertJobStatusSuccess()

assertThat(helper.callStack.findAll { call ->
call.methodName == 'sh'
}.any { call ->
callArgsToString(call).contains('release_notes.sh')
}).isTrue()
}
}

0 comments on commit fdb2ee6

Please sign in to comment.