forked from opensearch-project/opensearch-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestCreateGithubIssue.groovy
32 lines (27 loc) · 1.07 KB
/
TestCreateGithubIssue.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
package jenkins.tests
import jenkins.tests.BuildPipelineTest
import org.junit.*
class TestCreateGithubIssue extends BuildPipelineTest {
@Override
@Before
void setUp() {
this.registerLibTester(new CreateGithubIssueLibTester(["Error building OpenSearch, retry with: ./build.sh manifests/2.2.0/opensearch-2.2.0.yml --component OpenSearch --snapshot"]))
super.setUp()
}
@Test
public void testCreateGithubIssue() {
helper.addShMock("gh issue list --repo https://github.com/opensearch-project/OpenSearch.git -S \"[AUTOCUT] OS Distribution Build Failed for OpenSearch-2.0.0 in:title\" --label autocut",'',0)
super.testPipeline("tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile")
}
@Test
public void testExistingGithubIssue() {
super.testPipeline("tests/jenkins/jobs/CreateGithubIssueExisting_Jenkinsfile")
}
}