Add install/update test harness; fix bugs surfaced by it#11
Merged
Conversation
Keep AIRPLANES_ROOT out of feed.env, accept a leading + on lat/lon, broaden the beast_reduce_plus_out migration to any TARGET line, skip self-update during update.sh test mode, and require exactly one entry in the getGIT archive fallback. Reorder dnf before yum in auto-detect, add wget/unzip/newt/gawk to RPM lists, and pull whiptail/mawk into the apt update set so the update-to-setup path works on minimal images. Prevent PR-ref expression injection in installer-smoke, pin it to the checked-out SHA via file://, and split it into a bundled/standalone matrix. Add bats coverage for configure.sh and an inline-fallback drift check between install.sh / update.sh and the shared lib.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds bats coverage and a Docker-based installer smoke matrix for
install.shandupdate.sh— the standalonecurl | bashpath, thegetGITwget fallback, and an end-to-end update against a fakefeed.airplanes.liveHTTP endpoint. To make this practical,install.shandupdate.shnow sharescripts/lib/install-update-common.sh(with inline fallbacks preserved so the standalone path keeps working). CI gates on shellcheck (warning),bash -n, and the bats suite;.shellcheckrcdisablesSC1090/SC2034for the dynamic-source and library-globals patterns intentional throughout the codebase.Writing the tests surfaced — and this PR also fixes — a handful of latent bugs:
update.shmigration frombeast_reduce_outtobeast_reduce_plus_out(the_plus_variant transmits the feeder UUID on connect, so the server can attribute the feed to a specific receiver) was a no-op —sedsource and replacement were byte-identical — and ran after the service had already restarted with the stale value. Existing feeders kept connecting anonymously and never picked up the new value.aptinstead ofapt-get(Debian documentsaptas unstable for scripting).source "$FEED_ENV"was unguarded; a missing config aborted underset -einstead of triggering the setup re-run path.configure.shaccepted any string for latitude/longitude, allowing numeric-prefix garbage to land in a sourced env file.