fix tests for ci

This commit is contained in:
az 2021-04-27 18:32:08 +02:00
parent 5eaf320d58
commit 6577067f48
5 changed files with 11 additions and 15 deletions

View file

@ -3,7 +3,6 @@ image: openjdk:11-jdk-slim
stages:
- build
- test
- jar
- publish
before_script:
@ -46,21 +45,15 @@ test:
reports:
junit: build/test-results/test/TEST-*.xml
jar:
stage: jar
publish:
stage: publish
script:
- echo "---------- jar ----------"
- ./gradlew jar
- ./gradlew publish
artifacts:
paths:
- build/libs/*.jar
expire_in: 2 months
publish:
stage: publish
script:
- echo "---------- publish ----------"
- ./gradlew publish
after_script:
- echo "---------- End CI ----------"

View file

@ -2,7 +2,7 @@ package io.provs
import io.provs.docker.provideContainer
import io.provs.test.tags.ContainerTest
import io.provs.test.tags.ContainerTestNonCi
import io.provs.test.tags.NonCi
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
@ -56,6 +56,7 @@ internal class ProvTest {
@Test
@EnabledOnOs(OS.LINUX)
@ContainerTest
@NonCi
fun sh_onLinux_with_dir_and_sudo() {
// given
val script = """
@ -429,7 +430,7 @@ internal class ProvTest {
@Test
@EnabledOnOs(OS.LINUX)
@ContainerTestNonCi
@NonCi
fun inContainer_locally() {
// given
val containerName = "provs_test"

View file

@ -5,7 +5,7 @@ import io.provs.docker.containerRuns
import io.provs.docker.exitAndRmContainer
import io.provs.docker.runContainer
import io.provs.local
import io.provs.test.tags.ContainerTestNonCi
import io.provs.test.tags.NonCi
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.condition.EnabledOnOs
@ -15,7 +15,7 @@ internal class UbuntuHostDockerKtTest {
@Test
@EnabledOnOs(OS.LINUX)
@ContainerTestNonCi
@NonCi
fun runAndCheckAndExitContainer() {
// when
val containerName = "testContainer"

View file

@ -1,6 +1,7 @@
package io.provs.platformTest
import io.provs.Prov
import io.provs.test.tags.NonCi
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.condition.EnabledOnOs
import org.junit.jupiter.api.condition.OS
@ -46,6 +47,7 @@ internal class UbuntuProvTests {
@Test
@EnabledOnOs(OS.LINUX)
@NonCi
fun that_cmd_works_with_sudo() {
// given
val a = Prov.defaultInstance()

View file

@ -18,4 +18,4 @@ annotation class ContainerTest
@kotlin.annotation.Retention
@Tag(CONTAINER_TEST_NON_CI)
@Test
annotation class ContainerTestNonCi
annotation class NonCi