Files
nixpkgs/nixos/tests/tsm-client-gui.nix
Yarny0 2ad8bf20ed tsm-client: 8.1.27.1 -> 8.2.1.0
Release notes ("What's new"):
https://www.ibm.com/docs/en/storage-protect/8.2.1?topic=whats-new#r_wn_tsmserver__title__3

The package now needs `brotli` and `libnghttp2`.

Unfortunatelly, the vm test's OCR no longer recognizes
the version number in the information dialog box
(it sees "8.21.0" instead of "8.2.1.0").
I don't think relaxing that test makes any sense,
as OCR might fail in a million different ways.
So I just remove the version number check from the test.
2026-03-27 19:31:06 +01:00

60 lines
1.7 KiB
Nix

# The tsm-client GUI first tries to connect to a server.
# We can't simulate a server, so we just check if
# it reports the correct connection failure error.
# After that the test persuades the GUI
# to show its main application window
# and verifies some configuration information.
{ lib, pkgs, ... }:
{
name = "tsm-client";
enableOCR = true;
nodes.machine =
{ pkgs, ... }:
{
imports = [ ./common/x11.nix ];
programs.tsmClient = {
enable = true;
package = pkgs.tsm-client-withGui;
defaultServername = "testserver";
servers.testserver = {
# 192.0.0.8 is a "dummy address" according to RFC 7600
tcpserveraddress = "192.0.0.8";
nodename = "SOME-NODE";
passworddir = "/tmp";
};
};
};
testScript = ''
machine.succeed("which dsmj") # fail early if this is missing
machine.wait_for_x()
machine.execute("DSM_LOG=/tmp dsmj -optfile=/dev/null >&2 &")
# does it report the "TCP/IP connection failure" error code?
machine.wait_for_window("IBM Storage Protect")
machine.wait_for_text("ANS2610S")
machine.send_key("esc")
# it asks to continue to restore a local backupset now;
# "yes" (return) leads to the main application window
machine.wait_for_text("backupset")
machine.send_key("ret")
# main window: navigate to "Connection Information"
machine.wait_for_text("Welcome")
machine.send_key("alt-f") # "File" menu
machine.send_key("c") # "Connection Information"
# "Connection Information" dialog box
machine.wait_for_window("Connection Information")
machine.wait_for_text("SOME-NODE")
machine.shutdown()
'';
meta.maintainers = [ lib.maintainers.yarny ];
}