Skip to content

The agent that grows with you

fix(install-e2e): accept either official origin form in the redirect check

ethernet04f0d8692d29
diff --git a/tests/install/installer-script-e2e.sh b/tests/install/installer-script-e2e.sh
index 038cbccc956..63d1100a687 100755
--- a/tests/install/installer-script-e2e.sh
+++ b/tests/install/installer-script-e2e.sh
@@ -229,11 +229,17 @@ desktop_checkpoint() { # phase, expected commit, selected method
# the rehearsal source, channel resolution would fail outright and the leg
# would be testing a fork install instead of the real user path.
assert_redirect_is_transport_only() {
- local official='https://github.com/NousResearch/hermes-agent.git'
+ # Either official form is valid: the installer clones over SSH or HTTPS
+ # depending on the environment, and both are "the official URL" as far as
+ # channel resolution is concerned.
+ local official_https='https://github.com/NousResearch/hermes-agent.git'
+ local official_ssh='[email protected]:NousResearch/hermes-agent.git'
local configured observed
configured="$(git -C "$INSTALL_DIR" config --get remote.origin.url)"
- [ "$configured" = "$official" ] \
- || fail "origin is configured as '$configured', not the official URL — the redirect is not transport-only"
+ case "$configured" in
+ "$official_https"|"$official_ssh") ;;
+ *) fail "origin is configured as '$configured', not an official URL — the redirect is not transport-only" ;;
+ esac
observed="$(git -C "$INSTALL_DIR" remote get-url origin)"
case "$observed" in
file://*|*serve.git*) ;;
diff --git a/tests/install/windows-e2e.ps1 b/tests/install/windows-e2e.ps1
index 3f966d7e5f9..7192d1d37c8 100644
--- a/tests/install/windows-e2e.ps1
+++ b/tests/install/windows-e2e.ps1
@@ -1047,9 +1047,10 @@ function Assert-RedirectIsTransportOnly {
# `git config --get remote.origin.url`. If the configured URL ever looked
# like the rehearsal source, channel resolution would fail and this leg
# would be testing a fork install rather than the real user path.
- $official = 'https://github.com/NousResearch/hermes-agent.git'
+ $official = @('https://github.com/NousResearch/hermes-agent.git',
+ '[email protected]:NousResearch/hermes-agent.git')
$configured = (Invoke-Git @('-C', $InstallDir, 'config', '--get', 'remote.origin.url') | Out-String).Trim()
- Assert-True ($configured -eq $official) "origin stays configured as the official URL (got '$configured')"
+ Assert-True ($official -contains $configured) "origin stays configured as an official URL (got '$configured')"
$observed = (Invoke-Git @('-C', $InstallDir, 'remote', 'get-url', 'origin') | Out-String).Trim()
Assert-True ($observed -match 'serve\.git|^file://') "origin transport is redirected to the staged repo (got '$observed')"
}