summaryrefslogtreecommitdiff
path: root/tests/docker
diff options
context:
space:
mode:
authornzbr <mail@nzbr.de>2023-09-29 23:25:53 +0200
committerGitHub <noreply@github.com>2023-09-29 23:25:53 +0200
commit8735bdfa5fdfa6e90d944ff9f5f806668b53eacb (patch)
tree64148d00bbc6f8e1d7ba099cfbf31123113db2f8 /tests/docker
parente7d93d0f478b6fbb47c00d03449dc3d08b90abb7 (diff)
parentff1413aa34c525bf01145b40b99acfb7868ab285 (diff)
Merge pull request #295 from nix-community/prep-release
New release preparation
Diffstat (limited to 'tests/docker')
-rw-r--r--tests/docker/docker-native.nix16
-rw-r--r--tests/docker/docker.Tests.ps11
2 files changed, 9 insertions, 8 deletions
diff --git a/tests/docker/docker-native.nix b/tests/docker/docker-native.nix
index 47ccb7f..f119482 100644
--- a/tests/docker/docker-native.nix
+++ b/tests/docker/docker-native.nix
@@ -1,12 +1,14 @@
-{ pkgs, lib, ... }:
{
- imports = [ ./base.nix ];
+ imports = [
+ <nixos-wsl/modules>
+ ];
- wsl.docker-native.enable = true;
- wsl.docker-native.addToDockerGroup = true;
+ wsl.enable = true;
+ users.users.nixos.extraGroups = [ "docker" ];
- # Github Actions runners try to use aufs and fail if this is not set explicitly
- virtualisation.docker.daemon.settings = {
- "storage-driver" = "vfs";
+ virtualisation.docker = {
+ enable = true;
+ # Github Actions runners try to use aufs and fail if this is not set explicitly
+ daemon.settings."storage-driver" = "vfs";
};
}
diff --git a/tests/docker/docker.Tests.ps1 b/tests/docker/docker.Tests.ps1
index fefff07..9ea46aa 100644
--- a/tests/docker/docker.Tests.ps1
+++ b/tests/docker/docker.Tests.ps1
@@ -27,7 +27,6 @@ Describe "Docker (native)" {
It "should be possible to connect to the internet from a container" {
$distro.Launch("docker run --rm -it alpine wget -qO- http://www.msftconnecttest.com/connecttest.txt") | Select-Object -Last 1 | Should -BeExactly "Microsoft Connect Test"
- # docker exec -it $distro.id /nix/nixos-wsl/entrypoint -c "docker run --rm -it alpine wget -qO- http://www.msftconnecttest.com/connecttest.txt" | Select-Object -Last 1 | Should -BeExactly "Microsoft Connect Test"
$LASTEXITCODE | Should -Be 0
}