9e8f1bbeed
Dashboard / frontend (push) Failing after 0s
Dashboard / api (push) Failing after 0s
Lint PowerShell / powershell-lint (ubuntu-latest) (push) Failing after 1s
Python Lint / Lint Python with Ruff (push) Failing after 1s
ShellCheck / Lint shell scripts (push) Failing after 1s
Matrix Smoke / linux-smoke (push) Failing after 1s
Matrix Smoke / distro: cachyos (push) Failing after 15s
Matrix Smoke / distro: linux-mint-21.3 (push) Failing after 15s
Matrix Smoke / distro: debian-12 (push) Failing after 5m21s
Matrix Smoke / distro: fedora-41 (push) Failing after 4m56s
Matrix Smoke / distro: ubuntu-24.04 (push) Failing after 2m13s
Matrix Smoke / distro: rocky-9 (push) Failing after 10m39s
Matrix Smoke / distro: manjaro (push) Failing after 12m11s
Matrix Smoke / distro: opensuse-tw (push) Failing after 11m53s
Matrix Smoke / distro: archlinux (push) Failing after 20m3s
Matrix Smoke / distro: ubuntu-22.04 (push) Failing after 13m49s
Validate .env Schema / tier-1-env-validation (push) Successful in 52s
Validate .env Schema / tier-2-env-validation (push) Successful in 44s
Validate .env Schema / tier-3-env-validation (push) Successful in 52s
Validate .env Schema / tier-4-env-validation (push) Successful in 51s
Validate Extensions Catalog / Check catalog is up-to-date (push) Failing after 9m47s
Secret Scan / Scan for secrets (push) Failing after 21m4s
Validate Docker Compose / Validate Docker Compose files (push) Has been cancelled
Python Type Check / Type check with mypy (push) Has been cancelled
Validate .env Schema / tier-0-env-validation (push) Has been cancelled
Test Linux / integration-smoke (push) Has been cancelled
Lint PowerShell / powershell-lint (windows-latest) (push) Has been cancelled
Matrix Smoke / macos-smoke (push) Has been cancelled
89 lines
2.3 KiB
Bash
89 lines
2.3 KiB
Bash
#!/usr/bin/env bats
|
|
|
|
load '../bats/bats-support/load'
|
|
load '../bats/bats-assert/load'
|
|
|
|
setup() {
|
|
export HOME="/tmp/ods-dispatch-test-home"
|
|
unset ODS_PLATFORM_OVERRIDE TERMUX_VERSION PREFIX TERM_PROGRAM ASHELL SHORTCUTS
|
|
source "$BATS_TEST_DIRNAME/../../installers/common.sh"
|
|
source "$BATS_TEST_DIRNAME/../../installers/dispatch.sh"
|
|
}
|
|
|
|
@test "detect_platform: recognizes Termux with Termux prefix" {
|
|
export TERMUX_VERSION="0.118.3"
|
|
export PREFIX="/data/data/com.termux/files/usr"
|
|
|
|
run detect_platform
|
|
assert_success
|
|
assert_output "android-termux"
|
|
}
|
|
|
|
@test "detect_platform: TERMUX_VERSION alone does not override host platform" {
|
|
export TERMUX_VERSION="0.118.3"
|
|
export PREFIX="/usr/local"
|
|
|
|
run detect_platform
|
|
assert_success
|
|
refute_output "android-termux"
|
|
}
|
|
|
|
@test "detect_platform: recognizes a-Shell with iOS container path" {
|
|
export TERM_PROGRAM="a-Shell"
|
|
export HOME="/private/var/mobile/Containers/Data/Application/123/Documents"
|
|
|
|
run detect_platform
|
|
assert_success
|
|
assert_output "ios-ashell"
|
|
}
|
|
|
|
@test "detect_platform: ASHELL alone does not route desktop shells to iOS" {
|
|
export ASHELL="1"
|
|
export HOME="/Users/example"
|
|
|
|
run detect_platform
|
|
assert_success
|
|
refute_output "ios-ashell"
|
|
}
|
|
|
|
@test "detect_platform: supports explicit override" {
|
|
export ODS_PLATFORM_OVERRIDE="android-termux"
|
|
|
|
run detect_platform
|
|
assert_success
|
|
assert_output "android-termux"
|
|
}
|
|
|
|
@test "resolve_installer_target: routes Termux to the mobile installer" {
|
|
export ODS_PLATFORM_OVERRIDE="android-termux"
|
|
|
|
run resolve_installer_target
|
|
assert_success
|
|
assert_output --partial "/installers/mobile/install-mobile.sh"
|
|
}
|
|
|
|
@test "resolve_installer_target: routes a-Shell to the mobile installer" {
|
|
export ODS_PLATFORM_OVERRIDE="ios-ashell"
|
|
|
|
run resolve_installer_target
|
|
assert_success
|
|
assert_output --partial "/installers/mobile/install-mobile.sh"
|
|
}
|
|
|
|
@test "resolve_installer_target: keeps desktop Linux on install-core" {
|
|
export ODS_PLATFORM_OVERRIDE="linux"
|
|
|
|
run resolve_installer_target
|
|
assert_success
|
|
assert_output --partial "/install-core.sh"
|
|
}
|
|
|
|
@test "detect_platform: treats non-gnu Linux OSTYPE values as Linux" {
|
|
unset ODS_PLATFORM_OVERRIDE
|
|
OSTYPE="linux"
|
|
|
|
run detect_platform
|
|
assert_success
|
|
assert_output "linux"
|
|
}
|