fix(deps): update testcontainers-node monorepo to v11 (major) (#3250)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com> Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ccd8a85e0f
commit
0d1e3a625a
@@ -64,26 +64,29 @@ describe("Home Assistant integration", () => {
|
||||
const prepareHomeAssistantContainerAsync = async () => {
|
||||
const homeAssistantContainer = createHomeAssistantContainer();
|
||||
const startedContainer = await homeAssistantContainer.start();
|
||||
|
||||
await startedContainer.exec(["unzip", "-o", "/tmp/config.zip", "-d", "/config"]);
|
||||
await startedContainer.restart();
|
||||
return startedContainer;
|
||||
};
|
||||
|
||||
const createHomeAssistantContainer = () => {
|
||||
return new GenericContainer(IMAGE_NAME)
|
||||
.withCopyFilesToContainer([
|
||||
{
|
||||
source: join(__dirname, "/volumes/home-assistant-config.zip"),
|
||||
target: "/tmp/config.zip",
|
||||
},
|
||||
])
|
||||
.withPrivilegedMode()
|
||||
.withExposedPorts(8123)
|
||||
.withWaitStrategy(Wait.forHttp("/", 8123));
|
||||
return (
|
||||
new GenericContainer(IMAGE_NAME)
|
||||
.withCopyFilesToContainer([
|
||||
{
|
||||
source: join(__dirname, "/volumes/home-assistant-config.zip"),
|
||||
target: "/tmp/config.zip",
|
||||
},
|
||||
])
|
||||
.withPrivilegedMode()
|
||||
.withExposedPorts(8123)
|
||||
// This has to be a page that is not redirected (or a status code has to be defined withStatusCode(statusCode))
|
||||
.withWaitStrategy(Wait.forHttp("/onboarding.html", 8123))
|
||||
);
|
||||
};
|
||||
|
||||
const createHomeAssistantIntegration = (container: StartedTestContainer, apiKeyOverride?: string) => {
|
||||
console.log("Creating Home Assistant integration...");
|
||||
return new HomeAssistantIntegration({
|
||||
id: "1",
|
||||
decryptedSecrets: [
|
||||
|
||||
@@ -211,12 +211,15 @@ const createPiHoleIntegrationV5 = (container: StartedTestContainer, apiKey: stri
|
||||
};
|
||||
|
||||
const createPiHoleV6Container = (password: string) => {
|
||||
return new GenericContainer("pihole/pihole:latest")
|
||||
.withEnvironment({
|
||||
FTLCONF_webserver_api_password: password,
|
||||
})
|
||||
.withExposedPorts(80)
|
||||
.withWaitStrategy(Wait.forHttp("/admin", 80));
|
||||
return (
|
||||
new GenericContainer("pihole/pihole:latest")
|
||||
.withEnvironment({
|
||||
FTLCONF_webserver_api_password: password,
|
||||
})
|
||||
.withExposedPorts(80)
|
||||
// This has to be a page that is not redirected (or a status code has to be defined withStatusCode(statusCode))
|
||||
.withWaitStrategy(Wait.forHttp("/admin/login", 80))
|
||||
);
|
||||
};
|
||||
|
||||
const createPiHoleIntegrationV6 = (container: StartedTestContainer, apiKey: string) => {
|
||||
|
||||
@@ -192,16 +192,19 @@ describe("Sabnzbd integration", () => {
|
||||
});
|
||||
|
||||
const createSabnzbdContainer = () => {
|
||||
return new GenericContainer(IMAGE_NAME)
|
||||
.withCopyFilesToContainer([
|
||||
{
|
||||
source: join(__dirname, "/volumes/usenet/sabnzbd.ini"),
|
||||
target: "/config/sabnzbd.ini",
|
||||
},
|
||||
])
|
||||
.withExposedPorts(1212)
|
||||
.withEnvironment({ PUID: "0", PGID: "0" })
|
||||
.withWaitStrategy(Wait.forHttp("/", 1212));
|
||||
return (
|
||||
new GenericContainer(IMAGE_NAME)
|
||||
.withCopyFilesToContainer([
|
||||
{
|
||||
source: join(__dirname, "/volumes/usenet/sabnzbd.ini"),
|
||||
target: "/config/sabnzbd.ini",
|
||||
},
|
||||
])
|
||||
.withExposedPorts(1212)
|
||||
.withEnvironment({ PUID: "0", PGID: "0" })
|
||||
// This has to be a page that is not redirected (or a status code has to be defined withStatusCode(statusCode))
|
||||
.withWaitStrategy(Wait.forHttp("/sabnzbd/wizard/", 1212))
|
||||
);
|
||||
};
|
||||
|
||||
const createSabnzbdIntegration = (container: StartedTestContainer, apiKey: string) => {
|
||||
|
||||
Reference in New Issue
Block a user