1 # The tsm-client GUI first tries to connect to a server.
2 # We can't simulate a server, so we just check if
3 # it reports the correct connection failure error.
4 # After that the test persuades the GUI
5 # to show its main application window
6 # and verifies some configuration information.
8 import ./make-test-python.nix ({ lib, pkgs, ... }: {
13 nodes.machine = { pkgs, ... }: {
14 imports = [ ./common/x11.nix ];
15 programs.tsmClient = {
17 package = pkgs.tsm-client-withGui;
18 defaultServername = "testserver";
19 servers.testserver = {
20 # 192.0.0.8 is a "dummy address" according to RFC 7600
21 tcpserveraddress = "192.0.0.8";
22 nodename = "SOME-NODE";
29 machine.succeed("which dsmj") # fail early if this is missing
31 machine.execute("DSM_LOG=/tmp dsmj -optfile=/dev/null >&2 &")
33 # does it report the "TCP/IP connection failure" error code?
34 machine.wait_for_window("IBM Storage Protect")
35 machine.wait_for_text("ANS2610S")
36 machine.send_key("esc")
38 # it asks to continue to restore a local backupset now;
39 # "yes" (return) leads to the main application window
40 machine.wait_for_text("backupset")
41 machine.send_key("ret")
43 # main window: navigate to "Connection Information"
44 machine.wait_for_text("Welcome")
45 machine.send_key("alt-f") # "File" menu
46 machine.send_key("c") # "Connection Information"
48 # "Connection Information" dialog box
49 machine.wait_for_window("Connection Information")
50 machine.wait_for_text("SOME-NODE")
51 machine.wait_for_text("${pkgs.tsm-client.passthru.unwrapped.version}")
56 meta.maintainers = [ lib.maintainers.yarny ];