Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(ssh): keep remote agents running across reconnects #17919

Closedluke2x(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/17919/headopened View on GitHub

Showing 2 changed files with 153 additions and 10 deletions (loading 1).

x
0 of 2 viewed, 2 left
153 additions and 10 deletionspackages/ssh/src/tunnel.test.tsModified
View file
@@ -250,7 +250,7 @@
launch,
'[ -n "$REMOTE_PID" ] && [ -n "$REMOTE_PORT" ] && kill -0 "$REMOTE_PID" 2>/dev/null',
- assert.include(launch, "RUNNER_CHANGED=1");
+ assert.include(launch, 'if [ "$RUNNER_CHANGED" -eq 1 ]; then');
assert.include(launch, "ensure_remote_node_path()");
assert.include(launch, "if ! ensure_remote_node_path; then");
assert.include(devLaunch, `T3_NODE_ENGINE_RANGE='${TEST_NODE_ENGINE_RANGE}'`);
@@ -297,19 +297,11 @@
assert.include(launch, "resolve_default_runtime_port()");
assert.include(launch, 'DEFAULT_RUNTIME_INFO="$(resolve_default_runtime_port');
assert.include(launch, "if (!Number.isInteger(pid) || pid <= 0 || !Number.isInteger(port))");
- assert.include(launch, 'PID_TO_STOP="${REMOTE_PID:-$DEFAULT_RUNTIME_PID}"');
+ assert.notInclude(launch, "PID_TO_STOP");
assert.include(launch, 'REMOTE_PORT="$DEFAULT_REMOTE_PORT"');
assert.include(launch, 'rm -f "$PID_FILE"');
assert.include(launch, "printf 'external\\n' >\"$MANAGED_FILE\"");
assert.include(launch, 'if [ -z "$REMOTE_PORT" ]; then');
- assert.isBelow(
- launch.indexOf('if [ "$REMOTE_MANAGED" = "managed" ]'),
- launch.indexOf("printf 'external\\n' >\"$MANAGED_FILE\""),
- );
- assert.isBelow(
- launch.indexOf('DEFAULT_RUNTIME_INFO="$(resolve_default_runtime_port'),
- launch.indexOf('elif [ -n "$REMOTE_PID" ]'),
- );
});
​