Loading nixos/tests/all-tests.nix +1 −0 Original line number Diff line number Diff line Loading @@ -408,6 +408,7 @@ in containers-tmpfs = runTest ./containers-tmpfs.nix; containers-unified-hierarchy = runTest ./containers-unified-hierarchy.nix; convos = runTest ./convos.nix; coredns = runTest ./coredns.nix; corerad = runTest ./corerad.nix; corteza = runTest ./corteza.nix; cosmic = runTest { Loading nixos/tests/coredns.nix 0 → 100644 +42 −0 Original line number Diff line number Diff line { pkgs, ... }: { name = "coredns"; meta = with pkgs.lib.maintainers; { maintainers = [ johanot ]; }; nodes.machine = { pkgs, ... }: { environment.systemPackages = [ pkgs.dnsutils ]; services.coredns = { enable = true; config = '' .:10053 { ipecho { domain test.nixos.org ttl 2629800 } } ''; package = pkgs.coredns.override { externalPlugins = [ { name = "ipecho"; repo = "github.com/Eun/coredns-ipecho"; version = "224170ebca45cc59c6b071d280a18f42d1ff130c"; position = "start-of-file"; } ]; vendorHash = "sha256-dNxHpXkiqz7B/JhZdxfZluIHFVXILlSm3XtB+v/EoMY="; }; }; }; testScript = '' machine.start() machine.wait_for_unit("coredns.service") machine.wait_for_open_port(10053) machine.succeed("dig @127.0.0.1 -p 10053 127.0.0.2.test.nixos.org A +short | grep 127.0.0.2") ''; } pkgs/by-name/co/coredns/package.nix +2 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ buildGoModule (finalAttrs: { for src in ${toString (attrsToSources externalPlugins)}; do go get $src; done go mod vendor CC= GOOS= GOARCH= go generate go mod vendor go mod tidy ''; Loading Loading @@ -134,6 +135,7 @@ buildGoModule (finalAttrs: { ''; passthru.tests = { coredns-external-plugins = nixosTests.coredns; kubernetes-single-node = nixosTests.kubernetes.dns-single-node; kubernetes-multi-node = nixosTests.kubernetes.dns-multi-node; }; Loading Loading
nixos/tests/all-tests.nix +1 −0 Original line number Diff line number Diff line Loading @@ -408,6 +408,7 @@ in containers-tmpfs = runTest ./containers-tmpfs.nix; containers-unified-hierarchy = runTest ./containers-unified-hierarchy.nix; convos = runTest ./convos.nix; coredns = runTest ./coredns.nix; corerad = runTest ./corerad.nix; corteza = runTest ./corteza.nix; cosmic = runTest { Loading
nixos/tests/coredns.nix 0 → 100644 +42 −0 Original line number Diff line number Diff line { pkgs, ... }: { name = "coredns"; meta = with pkgs.lib.maintainers; { maintainers = [ johanot ]; }; nodes.machine = { pkgs, ... }: { environment.systemPackages = [ pkgs.dnsutils ]; services.coredns = { enable = true; config = '' .:10053 { ipecho { domain test.nixos.org ttl 2629800 } } ''; package = pkgs.coredns.override { externalPlugins = [ { name = "ipecho"; repo = "github.com/Eun/coredns-ipecho"; version = "224170ebca45cc59c6b071d280a18f42d1ff130c"; position = "start-of-file"; } ]; vendorHash = "sha256-dNxHpXkiqz7B/JhZdxfZluIHFVXILlSm3XtB+v/EoMY="; }; }; }; testScript = '' machine.start() machine.wait_for_unit("coredns.service") machine.wait_for_open_port(10053) machine.succeed("dig @127.0.0.1 -p 10053 127.0.0.2.test.nixos.org A +short | grep 127.0.0.2") ''; }
pkgs/by-name/co/coredns/package.nix +2 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ buildGoModule (finalAttrs: { for src in ${toString (attrsToSources externalPlugins)}; do go get $src; done go mod vendor CC= GOOS= GOARCH= go generate go mod vendor go mod tidy ''; Loading Loading @@ -134,6 +135,7 @@ buildGoModule (finalAttrs: { ''; passthru.tests = { coredns-external-plugins = nixosTests.coredns; kubernetes-single-node = nixosTests.kubernetes.dns-single-node; kubernetes-multi-node = nixosTests.kubernetes.dns-multi-node; }; Loading