Initial Commit

This commit is contained in:
2026-05-27 23:47:53 +01:00
parent fbc70f96e6
commit 9b28db724f
18103 changed files with 1600554 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import { describe, expect, it } from "@suaveplan/testing/runner";
import {
CDN_SERVICE_NAME,
DEFAULT_AUTH_URL,
DEFAULT_REGION,
DEFAULT_RETRY_BASE_DELAY_MS,
DEFAULT_RETRY_MAX_ATTEMPTS,
DEFAULT_RETRY_MAX_DELAY_MS,
MAX_KEY_LENGTH,
RACKSPACE_REGIONS,
RETRY_AFTER_MAX_DELAY_MS,
STORAGE_SERVICE_NAME,
TOKEN_REFRESH_LEAD_MS,
TRANSIENT_HTTP_STATUSES,
} from "./constants.js";
describe("constants", () => {
it("expose the documented defaults", { timeout: 5000 }, () => {
expect(DEFAULT_AUTH_URL).toContain("identity.api.rackspacecloud.com");
expect(DEFAULT_REGION).toBe("LON");
expect(STORAGE_SERVICE_NAME).toBe("cloudFiles");
expect(CDN_SERVICE_NAME).toBe("cloudFilesCDN");
expect(RACKSPACE_REGIONS).toContain("LON");
expect(TOKEN_REFRESH_LEAD_MS).toBe(5 * 60 * 1000);
expect(MAX_KEY_LENGTH).toBe(2048);
expect(DEFAULT_RETRY_MAX_ATTEMPTS).toBeGreaterThan(0);
expect(DEFAULT_RETRY_BASE_DELAY_MS).toBeGreaterThan(0);
expect(DEFAULT_RETRY_MAX_DELAY_MS).toBeGreaterThan(
DEFAULT_RETRY_BASE_DELAY_MS
);
expect(RETRY_AFTER_MAX_DELAY_MS).toBe(60_000);
expect(TRANSIENT_HTTP_STATUSES.has(429)).toBe(true);
});
});