Unverified Commit 24ac0b43 authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents 94db8d8c 8f2659f1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ in
      after = [ "network.target" ];
      environment.ZIGBEE2MQTT_DATA = cfg.dataDir;
      serviceConfig = {
        Type = "notify";
        ExecStart = "${cfg.package}/bin/zigbee2mqtt";
        User = "zigbee2mqtt";
        Group = "zigbee2mqtt";
+1 −0
Original line number Diff line number Diff line
@@ -627,6 +627,7 @@ in {
  ntfy-sh = handleTest ./ntfy-sh.nix {};
  ntfy-sh-migration = handleTest ./ntfy-sh-migration.nix {};
  ntpd-rs = handleTest ./ntpd-rs.nix {};
  nvmetcfg = handleTest ./nvmetcfg.nix {};
  nzbget = handleTest ./nzbget.nix {};
  nzbhydra2 = handleTest ./nzbhydra2.nix {};
  oh-my-zsh = handleTest ./oh-my-zsh.nix {};
+43 −0
Original line number Diff line number Diff line
import ./make-test-python.nix ({ lib, ... }: {
  name = "nvmetcfg";

  meta = {
    maintainers = with lib.maintainers; [ nickcao ];
  };

  nodes = {
    server = { pkgs, ... }: {
      boot.kernelModules = [ "nvmet" ];
      environment.systemPackages = [ pkgs.nvmetcfg ];
      networking.firewall.allowedTCPPorts = [ 4420 ];
      virtualisation.emptyDiskImages = [ 512 ];
    };
    client = { pkgs, ... }: {
      boot.kernelModules = [ "nvme-fabrics" ];
      environment.systemPackages = [ pkgs.nvme-cli ];
    };
  };

  testScript = let subsystem = "nqn.2014-08.org.nixos:server"; in ''
    import json

    with subtest("Create subsystem and namespace"):
      server.succeed("nvmet subsystem add ${subsystem}")
      server.succeed("nvmet namespace add ${subsystem} 1 /dev/vdb")

    with subtest("Bind subsystem to port"):
      server.wait_for_unit("network-online.target")
      server.succeed("nvmet port add 1 tcp 0.0.0.0:4420")
      server.succeed("nvmet port add-subsystem 1 ${subsystem}")

    with subtest("Discover and connect to available subsystems"):
      client.wait_for_unit("network-online.target")
      assert "subnqn:  ${subsystem}" in client.succeed("nvme discover --transport=tcp --traddr=server --trsvcid=4420")
      client.succeed("nvme connect-all --transport=tcp --traddr=server --trsvcid=4420")

    with subtest("Write to the connected subsystem"):
      devices = json.loads(client.succeed("lsblk --nvme --paths --json"))["blockdevices"]
      assert len(devices) == 1
      client.succeed(f"dd if=/dev/zero of={devices[0]['name']} bs=1M count=64")
  '';
})
+11 −2
Original line number Diff line number Diff line
@@ -3,6 +3,15 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
    name = "zigbee2mqtt";
    nodes.machine = { pkgs, ... }:
      {
        systemd.services.dummy-serial = {
          wantedBy = [
            "multi-user.target"
          ];
          serviceConfig = {
            ExecStart = "${pkgs.socat}/bin/socat pty,link=/dev/ttyACM0,mode=666 pty,link=/dev/ttyACM1";
          };
        };

        services.zigbee2mqtt = {
          enable = true;
        };
@@ -11,10 +20,10 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
      };

    testScript = ''
      machine.wait_for_unit("zigbee2mqtt.service")
      machine.wait_for_unit("multi-user.target")
      machine.wait_until_fails("systemctl status zigbee2mqtt.service")
      machine.succeed(
          "journalctl -eu zigbee2mqtt | grep \"Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyACM0'\""
          "journalctl -eu zigbee2mqtt | grep 'Failed to connect to the adapter'"
      )

      machine.log(machine.succeed("systemd-analyze security zigbee2mqtt.service"))
+2 −2
Original line number Diff line number Diff line
@@ -2,13 +2,13 @@

buildGoModule rec {
  pname = "docker-slim";
  version = "1.40.10";
  version = "1.40.11";

  src = fetchFromGitHub {
    owner = "slimtoolkit";
    repo = "slim";
    rev = version;
    hash = "sha256-NpQyIOR8FkOgPHi3UwBAEpouJF/eaSAWD2zQ5dj+gAg=";
    hash = "sha256-X+1euWp4W53axbiBpL82bUPfod/JNhGVGWgOqKyhz6A=";
  };

  vendorHash = null;
Loading