test(registry): regression for boot Register non-200 log (#2615) #2630
Reference in New Issue
Block a user
Delete Branch "fix/registry-boot-register-log-regression-test"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes molecule-core#2615 (next coverage gap).
PR #2563 added a deferred log in
RegistryHandler.Registerthat recordsboot_register_failed status=%dwhenever boot registration returns non-200, but it shipped without a test. This change adds two regression tests inworkspace-server/internal/handlers/registry_test.go:TestRegister_Non200_LogsStatusCode— drives a 500 response path and asserts the failure log contains the workspace ID andstatus=500.TestRegister_200_DoesNotLogFailure— drives a successful 200 first-registration and asserts the failure log is not emitted.Test plan:
Both tests pass locally.
Approved on head
6a11c96f13.5-axis review:
RegistryHandler.Registerpath and assert the deferredboot_register_failed status=<code>log appears on a 500 response and is absent on a 200 response.Verification note: attempted focused Go test, but this runtime does not have
goinstalled. Static review found no blocker.