nixos/tests/vscode-remote-ssh: fix ocr, add timeout (#336154)

This commit is contained in:
Pol Dellaiera
2024-09-08 18:20:28 +02:00
committed by GitHub
+10 -2
View File
@@ -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: