srt is pinned to 0.0.83, the version the smoketest passed with. A computer with another version sees the agents item as to do in configure, which installs the pinned one. Move the pin only after smoketest/run 50 80 passes. The installer and configure stop on Pop!_OS (or Ubuntu) older than 26.04. The smoketest builds on Ubuntu 26.04, with checks that 24.04 is refused. 26.04's own AppArmor profile lets bubblewrap make user namespaces, so the connector's profile for it, and the code that offered to add it, are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
2.0 KiB
Bash
38 lines
2.0 KiB
Bash
# shellcheck shell=bash
|
|
# Scenarios set what the runner and items read
|
|
# shellcheck disable=SC2034
|
|
DESCRIPTION="install.sh piped into bash, as curl | bash runs it, then update"
|
|
TIER=quick
|
|
|
|
scenario() {
|
|
step "Install the working copy, with jq missing"
|
|
sudo apt-get remove -y jq > /dev/null 2>&1
|
|
export FEDERATED_CONNECTOR_SOURCE="$CONNECTOR"
|
|
bash < "$CONNECTOR/install.sh" > "$HOME/install.log" 2>&1
|
|
check_eq "install.sh succeeds" 0 $?
|
|
check "it installed jq again" pkg_installed jq
|
|
check "configure is linked in ~/.local/bin" test -L "$HOME/.local/bin/configure"
|
|
check "update is linked in ~/.local/bin" test -L "$HOME/.local/bin/update"
|
|
check "the install is in place" test -x "$HOME/.local/share/federated-connector/connector/configure"
|
|
check_eq "it records the version" local "$(cat "$HOME/.local/share/federated-connector/connector/.version")"
|
|
check "configure is on PATH in a new bash" bash -ic 'command -v configure' < /dev/null
|
|
check "it didn't ask to run configure without a terminal" grep -q "In a new terminal, run: configure" "$HOME/install.log"
|
|
check "it wrote a log" compgen -G "$HOME/.local/state/federated-connector/install-*.log"
|
|
|
|
step "update"
|
|
check "update --version" "$HOME/.local/bin/update" --version
|
|
"$HOME/.local/bin/update" > "$HOME/update.log" 2>&1
|
|
check_eq "update succeeds" 0 $?
|
|
check "no staging folders are left" bash -c '! compgen -G "$HOME/.local/share/federated-connector/.connector-*"'
|
|
check_eq "the PATH block is in ~/.bashrc once" 1 "$(grep -c '>>> Federated Connector commands >>>' "$HOME/.bashrc")"
|
|
check "the installed configure runs" "$HOME/.local/bin/configure" --help
|
|
|
|
step "On Pop!_OS 24.04, which isn't supported"
|
|
sudo cp /etc/os-release "$HOME/os-release"
|
|
sudo sed -i 's/26\.04/24.04/g; s/resolute/noble/g' /etc/os-release
|
|
bash < "$CONNECTOR/install.sh" > "$HOME/old.log" 2>&1
|
|
check_eq "install.sh stops" 1 $?
|
|
check "it says to upgrade" grep -q "needs Pop!_OS 26.04 or later" "$HOME/old.log"
|
|
sudo cp "$HOME/os-release" /etc/os-release
|
|
}
|