You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
Kotlin
42 lines
1.2 KiB
Kotlin
package org.domaindrivenarchitecture.provs.framework.ubuntu.install.base
|
|
|
|
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall
|
|
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstallFromPpa
|
|
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
|
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
|
import org.junit.jupiter.api.Assertions.assertTrue
|
|
import org.junit.jupiter.api.Disabled
|
|
import org.junit.jupiter.api.Test
|
|
|
|
|
|
internal class InstallKtTest {
|
|
|
|
@ContainerTest
|
|
@Test
|
|
fun aptInstall_installsPackage() {
|
|
// given
|
|
val a = defaultTestContainer()
|
|
|
|
// when
|
|
val res = a.aptInstall("rolldice")
|
|
|
|
// then
|
|
assertTrue(res.success)
|
|
}
|
|
|
|
@ContainerTest
|
|
@Test
|
|
@Disabled // run manually if needed;
|
|
// todo: replace zim by a smaller repo
|
|
fun aptInstallFromPpa_installsPackage() {
|
|
// given
|
|
val a = defaultTestContainer()
|
|
a.aptInstall("software-properties-common") // prereq for adding a repo to apt
|
|
|
|
// when
|
|
val res = a.aptInstallFromPpa("jaap.karssenberg", "zim", "zim")
|
|
|
|
// then
|
|
assertTrue(res.success)
|
|
}
|
|
} |