Adjusted installation of DeltaChat

This commit is contained in:
Clemens Geibel 2022-06-24 15:13:14 +02:00
parent c7e6266eb0
commit 4e698da78f
5 changed files with 47 additions and 3 deletions

View file

@ -79,7 +79,7 @@ fun Prov.provisionDesktop(
aptInstall(BROWSER) aptInstall(BROWSER)
aptInstall(EMAIL_CLIENT) aptInstall(EMAIL_CLIENT)
aptInstall(MESSENGER) installDeltaChat()
aptInstall(OFFICE_SUITE) aptInstall(OFFICE_SUITE)
aptInstall(CLIP_TOOLS) aptInstall(CLIP_TOOLS)

View file

@ -0,0 +1,10 @@
package org.domaindrivenarchitecture.provs.desktop.infrastructure
import org.domaindrivenarchitecture.provs.framework.core.Prov
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall
fun Prov.installDeltaChat() = task {
aptInstall("flatpak ca-certificates")
cmd("sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo")
cmd("sudo flatpak install -y --noninteractive flathub chat.delta.desktop")
}

View file

@ -12,8 +12,6 @@ val BROWSER = "firefox chromium-browser"
val EMAIL_CLIENT = "thunderbird" val EMAIL_CLIENT = "thunderbird"
val MESSENGER = "deltachat-desktop"
val OFFICE_SUITE = "libreoffice" val OFFICE_SUITE = "libreoffice"
val CLIP_TOOLS = "xclip" val CLIP_TOOLS = "xclip"

View file

@ -45,6 +45,23 @@ internal class DesktopServiceKtTest {
assertTrue(res.success) assertTrue(res.success)
} }
@ExtensiveContainerTest
fun provisionIDEDesktop() {
// given
val prov = defaultTestContainer()
// when
// in order to test DesktopType.OFFICE: fix installing libreoffice for a fresh container as it hangs the first time but succeeds 2nd time
val res = prov.provisionDesktop(
DesktopType.IDE,
gitUserName = "testuser",
gitEmail = "testuser@test.org",
)
// then
assertTrue(res.success)
}
@ExtensiveContainerTest @ExtensiveContainerTest
fun provisionDesktopFromConfigFile() { fun provisionDesktopFromConfigFile() {

View file

@ -0,0 +1,19 @@
package org.domaindrivenarchitecture.provs.desktop.infrastructure
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
import org.domaindrivenarchitecture.provs.test.tags.ExtensiveContainerTest
import org.junit.jupiter.api.Assertions.assertTrue
class DeltaChatKtTest {
@ExtensiveContainerTest
fun installDeltaChat() {
// given
val a = defaultTestContainer()
// when
val res = a.task { installDeltaChat() }
// then
assertTrue(res.success)
}
}