diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NextcloudClient.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NextcloudClient.kt index 1304c3d..51ba2e4 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NextcloudClient.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NextcloudClient.kt @@ -1,9 +1,10 @@ package org.domaindrivenarchitecture.provs.desktop.infrastructure import org.domaindrivenarchitecture.provs.framework.core.Prov -import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstallFromPpa fun Prov.installNextcloudClient() = task { - aptInstallFromPpa("nextcloud-devs", "client", "nextcloud-client") + cmd("apt-get -q=2 update && apt-get -q=2 upgrade", sudo = true) + //large stdout breaks install, redirect stdout to /dev/null + cmd("apt-get install -q=2 nextcloud-desktop 1>/dev/null", sudo = true) } diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NextcloudClientTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NextcloudClientTest.kt index b3133e4..cadd185 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NextcloudClientTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NextcloudClientTest.kt @@ -3,14 +3,20 @@ 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 -import org.junit.jupiter.api.Disabled + internal class NextcloudClientTest { - @Disabled // test is hanging sometimes @ExtensiveContainerTest fun test_installNextcloudClient() { + //given + val prov = defaultTestContainer() + prov.cmd("DEBIAN_FRONTEND=noninteractive TZ=${"Europe/Berlin"} apt-get -q=2 install tzdata", sudo = true) + // when - val res = defaultTestContainer().installNextcloudClient() + val res = prov.task { + installNextcloudClient() + installNextcloudClient() + } // then assertTrue(res.success)