Add release headers service, runtime-aware API header handling, and i18n updates for release configuration
- Implement `releaseHeaders.js` to manage release-related HTTP headers. - Update requests to include runtime-based release headers. - Extend i18n phrases across multiple locales for release runtime and configuration labels. - Enhance unit tests for header building and API availability error handling.
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
releaseManagerControlApiCandidates,
|
||||
setReleaseManagerControlApiUrl,
|
||||
} from "@/services/superuserReleases.js";
|
||||
import { deployCoolifyGatewayRoutes } from "@/services/superuserCoolify.js";
|
||||
import { __configureRequestQueueForTests, __resetRequestQueueForTests } from "@/services/requestQueue.js";
|
||||
|
||||
describe("superuser release manager service", () => {
|
||||
@@ -71,4 +72,20 @@ describe("superuser release manager service", () => {
|
||||
expect(localStorage.getItem(RELEASE_MANAGER_CONTROL_API_STORAGE_KEY)).toBeNull();
|
||||
expect(releaseManagerControlApiCandidates()).toContain("https://api.truckwash.io:4433");
|
||||
});
|
||||
|
||||
it("keeps Coolify route deployment on the release manager control API", async () => {
|
||||
setReleaseManagerControlApiUrl("https://control.example.test");
|
||||
axiosMock.mockResolvedValueOnce({ status: 200, data: { success: true } });
|
||||
|
||||
await deployCoolifyGatewayRoutes({ dry_run: true });
|
||||
|
||||
expect(axiosMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
url: "https://control.example.test/superuser/coolify/load-balancer/routes/deploy",
|
||||
method: "POST",
|
||||
data: { dry_run: true },
|
||||
__skipReleaseApiRewrite: true,
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user