From 0bd853aab8d458590c98f02d9f3e8fb57a97a49f Mon Sep 17 00:00:00 2001 From: ghpzin Date: Tue, 20 Aug 2024 23:29:31 +0300 Subject: [PATCH] nixos/tests/vscode-remote-ssh: fix ocr, add timeout --- nixos/tests/vscode-remote-ssh.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nixos/tests/vscode-remote-ssh.nix b/nixos/tests/vscode-remote-ssh.nix index 2b2630ef87d2..278f2308cc16 100644 --- a/nixos/tests/vscode-remote-ssh.nix +++ b/nixos/tests/vscode-remote-ssh.nix @@ -14,7 +14,11 @@ import ./make-test-python.nix ({ lib, ... }@args: let inherit (pkgs.vscode.passthru) rev vscodeServer; in { name = "vscode-remote-ssh"; - meta.maintainers = [ ]; + + meta = { + maintainers = [ ]; + timeout = 600; + }; nodes = let serverAddress = "192.168.0.2"; @@ -70,7 +74,11 @@ in { client.succeed("sudo -u alice code --remote=ssh-remote+root@server /root") client.wait_for_window("Visual Studio Code") - client.wait_for_text("Do you trust the authors" if should_succeed else "Disconnected from SSH") + if should_succeed: + ocr_text = "Do you trust" + else: + ocr_text = "Could not establish connection" + client.wait_for_text(ocr_text) client.screenshot(screenshot) if should_succeed: