63 lines
No EOL
1.7 KiB
Bash
63 lines
No EOL
1.7 KiB
Bash
#!/bin/bash
|
|
|
|
# Test script for Bazzite-style status output in Particle-OS bootc-alternative
|
|
# This demonstrates the new deployment tracking functionality
|
|
|
|
set -e
|
|
|
|
echo "=== Particle-OS Bazzite-Style Status Test ==="
|
|
echo "Testing the new deployment tracking functionality"
|
|
echo ""
|
|
|
|
# Initialize deployment tracking
|
|
echo "1. Initializing deployment tracking..."
|
|
./bootc-alternative.sh init-deployment
|
|
echo ""
|
|
|
|
# Show initial status
|
|
echo "2. Initial status (should show 'unknown' for current deployment):"
|
|
./bootc-alternative.sh status
|
|
echo ""
|
|
|
|
# Stage a test deployment
|
|
echo "3. Staging a test deployment..."
|
|
./bootc-alternative.sh stage "ghcr.io/particle-os/baryon:stable" "sha256:test123456789" "41.20250127.1"
|
|
echo ""
|
|
|
|
# Show status after staging
|
|
echo "4. Status after staging (should show staged deployment):"
|
|
./bootc-alternative.sh status
|
|
echo ""
|
|
|
|
# Deploy the staged deployment
|
|
echo "5. Deploying staged deployment..."
|
|
./bootc-alternative.sh deploy
|
|
echo ""
|
|
|
|
# Show status after deployment
|
|
echo "6. Status after deployment (should show booted deployment):"
|
|
./bootc-alternative.sh status
|
|
echo ""
|
|
|
|
# Stage another deployment
|
|
echo "7. Staging another deployment..."
|
|
./bootc-alternative.sh stage "ghcr.io/particle-os/baryon:stable" "sha256:test987654321" "41.20250127.2"
|
|
echo ""
|
|
|
|
# Show status with both current and staged
|
|
echo "8. Status with current and staged deployments:"
|
|
./bootc-alternative.sh status
|
|
echo ""
|
|
|
|
# Show JSON status
|
|
echo "9. JSON status output:"
|
|
./bootc-alternative.sh status-json
|
|
echo ""
|
|
|
|
echo "=== Test Complete ==="
|
|
echo "The status output should now match the Bazzite-style format:"
|
|
echo "- Staged image: (if any)"
|
|
echo "- ● Booted image: (current)"
|
|
echo "- Rollback image: (if any)"
|
|
echo ""
|
|
echo "Each with digest, version, and timestamp information." |