Fix backup/restore test listener exposure - #12
Open
DeveloperDurp wants to merge 1 commit into
Open
Conversation
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.
Motivation
:8080, which exposes a privileged test user on all interfaces during the run.Description
loadAddr()incmd/server/main.goand switched the server to useDURPDEPLOY_ADDRwhen present, preserving:8080as the default when the env var is not set, and logging the resolved address viaslog.scripts/test-backup-restore.shto pick a random free loopback port (127.0.0.1:<port>) and export it asSERVER_ADDR/BASEfor the test instead of using:8080/localhost:8080.openssl rand -base64 32) and passDURPDEPLOY_ADDRinto the test server invocation so it binds only to the loopback address chosen by the test.Testing
bash -n scripts/test-backup-restore.shand it succeeded. (pass)gofmt -l cmd/server/main.goandgit diff --check, both returned clean results. (pass)go test -v -count=1 ./...but it could not complete because generated*_templ.gofiles andstatic/swagger-ui/are absent andtemplinstallation is blocked by network/proxy restrictions in this environment;templ generatecould not be run here. (blocked)make swagger-ui-copyproduced the Swagger UI assets buttempl-generatefailed locally due to the missingtemplbinary; subsequentgo testremains un-run for the reasons above. (partial/blocked)Codex Task