Martin Dimitrov 16f1e96f83
All checks were successful
Build and push image for doorman-homeassistant / docker (push) Successful in 31s
Build and push Doorman UI / API / docker (push) Successful in 1m37s
Build and push image for doorman-homeassistant / deploy-gitainer (push) Successful in 5s
add auth integration tests
2025-06-03 17:13:28 -07:00

18 lines
516 B
TypeScript

export const baseUrl = "http://localhost:8080";
export const doorName = "test";
export const buzzerNumber = "6133163433";
export const key = "1234";
export const waitForService = async (url: string, timeout = 30000) => {
const start = Date.now();
while (Date.now() - start < timeout) {
try {
await fetch(url);
return true;
} catch (err) {
await new Promise(resolve => setTimeout(resolve, 1000));
}
}
throw new Error(`Service at ${url} did not start within ${timeout}ms`);
};