branch initial commit

pull/3/head
az 1 year ago
parent bf436bf846
commit 6537058ecf

@ -3,9 +3,11 @@ FROM ubuntu:latest
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install apt-utils sudo
RUN useradd -m testuser && echo "testuser:testuser" | chpasswd && adduser testuser sudo
RUN useradd -m testuser && echo "testuserpw:testuser" | chpasswd && adduser testuser sudo
RUN echo "testuser ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/testuser
RUN useradd testuser2 && echo "testuser2pw:testuser2" | chpasswd && adduser testuser2 sudo
USER testuser
CMD /bin/bash
WORKDIR /home/testuser

@ -3,6 +3,7 @@ package org.domaindrivenarchitecture.provs.desktop.domain
import org.domaindrivenarchitecture.provs.desktop.infrastructure.getConfig
import org.domaindrivenarchitecture.provs.framework.core.remote
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
import org.domaindrivenarchitecture.provs.test.tags.ExtensiveContainerTest
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Disabled
@ -10,6 +11,24 @@ import org.junit.jupiter.api.Test
internal class DesktopServiceKtTest {
@ContainerTest
fun provisionLocalDesktop_fails_if_user_cannot_sudo_without_password() {
// given
val prov =
// 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.BASIC,
gitUserName = "testuser",
gitEmail = "testuser@test.org",
onlyModules = null
)
// then
assertTrue(res.success)
}
@ExtensiveContainerTest
fun provisionDesktop() {
// given

Loading…
Cancel
Save