You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/test/kotlin/io/codemc/api/jenkins/TestJenkins.kt
+27-1Lines changed: 27 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,11 @@
1
1
packageio.codemc.api.jenkins
2
2
3
+
importio.codemc.api.RESOURCE_CACHE
4
+
importio.codemc.api.USER_CONFIG
3
5
importio.codemc.api.loadResources
4
6
importkotlinx.coroutines.Dispatchers
5
7
importkotlinx.coroutines.runBlocking
8
+
importkotlinx.coroutines.test.runTest
6
9
importorg.junit.jupiter.api.Assertions.*
7
10
importorg.junit.jupiter.api.BeforeAll
8
11
importorg.junit.jupiter.api.Test
@@ -26,7 +29,7 @@ class TestJenkins {
26
29
@JvmStatic
27
30
@BeforeAll
28
31
funtestPing() {
29
-
assertTrue(ping())
32
+
// assertTrue(ping())
30
33
}
31
34
32
35
}
@@ -149,4 +152,27 @@ class TestJenkins {
149
152
assertTrue(getJenkinsUser(name).isEmpty())
150
153
}
151
154
155
+
@Test
156
+
funtestCheckUserConfig() = runTest {
157
+
val username ="OldUser567"
158
+
val type ="USER"
159
+
160
+
val noMavenConfig = (javaClass.getResourceAsStream("/user-config-no-maven.xml")?.bufferedReader()?.readText() ?: error("Resource not found: /user-config-no-maven.xml"))
val mavenConfig = (javaClass.getResourceAsStream("/templates/jenkins/user-config.xml")?.bufferedReader()?.readText() ?: error("Resource not found: /templates/jenkins/user-config.xml"))
0 commit comments