test(integration): skip volume mounting in CI
This commit is contained in:
parent
a488bbc754
commit
dfd787c8ae
3 changed files with 6 additions and 1 deletions
2
.github/workflows/integration.yml
vendored
2
.github/workflows/integration.yml
vendored
|
|
@ -20,6 +20,8 @@ jobs:
|
||||||
uses: "./.github/actions/install-dependencies"
|
uses: "./.github/actions/install-dependencies"
|
||||||
|
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
|
env:
|
||||||
|
SKIP_VOLUME_MOUNT_INTEGRATION_TESTS: "true"
|
||||||
run: bun run test:integration
|
run: bun run test:integration
|
||||||
|
|
||||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
LOG_LEVEL: "error"
|
LOG_LEVEL: "error"
|
||||||
SFTP_PRIVATE_KEY_PATH: "/run/zerobyte/sftp/id_ed25519"
|
SFTP_PRIVATE_KEY_PATH: "/run/zerobyte/sftp/id_ed25519"
|
||||||
|
SKIP_VOLUME_MOUNT_INTEGRATION_TESTS: "${SKIP_VOLUME_MOUNT_INTEGRATION_TESTS:-false}"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
rustfs-data:
|
rustfs-data:
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,8 @@ const scenarios: VolumeScenario[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const volumeMountTest = process.env.SKIP_VOLUME_MOUNT_INTEGRATION_TESTS === "true" ? test.skip : test;
|
||||||
|
|
||||||
const makeDirectoriesWritable = async (root: string): Promise<void> => {
|
const makeDirectoriesWritable = async (root: string): Promise<void> => {
|
||||||
await fs.chmod(root, 0o700).catch(() => {});
|
await fs.chmod(root, 0o700).catch(() => {});
|
||||||
|
|
||||||
|
|
@ -76,7 +78,7 @@ const makeDirectoriesWritable = async (root: string): Promise<void> => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
test.concurrent.each(scenarios)("$name can backup and restore static fixture data", async (scenario) => {
|
volumeMountTest.concurrent.each(scenarios)("$name can backup and restore static fixture data", async (scenario) => {
|
||||||
const runId = crypto.randomUUID();
|
const runId = crypto.randomUUID();
|
||||||
const workspace = path.join(INTEGRATION_RUNS_DIR, `${scenario.id}-${runId}`);
|
const workspace = path.join(INTEGRATION_RUNS_DIR, `${scenario.id}-${runId}`);
|
||||||
const mountPath = path.join(workspace, "mount");
|
const mountPath = path.join(workspace, "mount");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue