'Generic Commit'
Some checks failed
Build-Test-Publish / build (push) Failing after 18s

This commit is contained in:
Your Name
2025-06-17 22:43:58 +12:00
parent f20c8ff330
commit a4ce65fa5b
6 changed files with 69 additions and 7 deletions

View File

@ -285,6 +285,25 @@ EOF
else
print_test_result "Publish tool without ARCH" 1
fi
# Test 12c: Install universal tool (arch fallback)
echo -e "\nTest 12c: Install universal tool (arch fallback)"
rm -rf ~/.config/getpkg/"${TEST_TOOL_NOARCH}.json" ~/.local/bin/getpkg/"${TEST_TOOL_NOARCH}" 2>/dev/null || true
FALLBACK_INSTALL_OUTPUT=$(timeout 3 "$GETPKG" install "${TEST_TOOL_NOARCH}" 2>&1) || FALLBACK_INSTALL_OUTPUT=""
if [[ "$FALLBACK_INSTALL_OUTPUT" =~ "Arch-specific version not found, trying universal version" ]] && [[ "$FALLBACK_INSTALL_OUTPUT" =~ "Installed ${TEST_TOOL_NOARCH} successfully" ]]; then
print_test_result "Install universal tool with arch fallback" 0
# Test update check for universal tool
UPDATE_UNIVERSAL_OUTPUT=$(timeout 3 "$GETPKG" install "${TEST_TOOL_NOARCH}" 2>&1) || UPDATE_UNIVERSAL_OUTPUT=""
if [[ "$UPDATE_UNIVERSAL_OUTPUT" =~ "${TEST_TOOL_NOARCH} is already up to date" ]]; then
print_test_result "Update check for universal tool" 0
else
print_test_result "Update check for universal tool" 1
fi
else
print_test_result "Install universal tool with arch fallback" 1
print_test_result "Update check for universal tool" 1
fi
else
echo -e "\n${YELLOW}Skipping publish/install tests (SOS_WRITE_TOKEN not set)${NC}"
echo "To run full tests, set SOS_WRITE_TOKEN environment variable"