fix tests

This commit is contained in:
ansgarz 2023-11-09 09:41:11 +01:00
parent e373d327f3
commit 59163710af

View file

@ -33,33 +33,34 @@ internal class ProvTest {
assertTrue(res) assertTrue(res)
} }
@ContainerTest @Test
fun sh() { fun sh() {
// given // given
val script = """ val script = """
# test some script commands # test some script commands
ping -c1 hetzner.com echo something1
echo something pwd
echo something3
""" """
// when // when
val res = Prov.newInstance(name = "testing").sh(script).success val res = Prov.newInstance(name = "provs_test").sh(script).success
// then // then
assertTrue(res) assertTrue(res)
} }
@ContainerTest @ContainerTest
@NonCi @NonCi // sudo might not be available
fun sh_with_dir_and_sudo() { fun sh_with_dir_and_sudo() {
// given // given
val script = """ val script = """
# test some script commands # test some script commands
ping -c1 hetzner.com pwd
echo something echo something1
echo 1 # comment behind command echo something2 # with comment behind command
""" """
// when // when