forked from gitlab4j/gitlab4j-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestDeployKeysApi.java
49 lines (39 loc) · 1.38 KB
/
TestDeployKeysApi.java
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package org.gitlab4j.api;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.extension.ExtendWith;
/**
* In order for these tests to run you must set the following properties in test-gitlab4j.properties
*
* TEST_HOST_URL
* TEST_PRIVATE_TOKEN
* TEST_USERNAME
*
* If any of the above are NULL, all tests in this class will be skipped.
*
*/
@Tag("integration")
@ExtendWith(SetupIntegrationTestExtension.class)
@org.junit.jupiter.api.Disabled("Integration tests are disabled, see https://github.com/gitlab4j/gitlab4j-api/issues/1165")
public class TestDeployKeysApi extends AbstractIntegrationTest {
// The following needs to be set to your test repository
private static final String TEST_USERNAME = HelperUtils.getProperty(USERNAME_KEY);
private static GitLabApi gitLabApi;
public TestDeployKeysApi() {
super();
}
@BeforeAll
public static void setup() {
// Must setup the connection to the GitLab test server
gitLabApi = baseTestSetup();
if (TEST_USERNAME == null || TEST_USERNAME.trim().isEmpty()) {
System.err.println("TEST_USER_NAME cannot be empty");
}
}
@BeforeEach
public void beforeMethod() {
assumeTrue(gitLabApi != null);
}
}