fix(backup-ng): use generic test for retentions (#103)

This commit is contained in:
heafalan
2019-06-24 14:15:24 +02:00
committed by badrAZ
parent 254fa36c01
commit 003eadc8fd
2 changed files with 6 additions and 3 deletions

View File

@@ -95,7 +95,7 @@ Array [
exports[`backupNg .runJob() : fails trying to run a backup job without schedule 1`] = `[JsonRpcError: invalid parameters]`;
exports[`backupNg .runJob() : fails trying to run backup job with remotes without exportRetention 1`] = `
exports[`backupNg .runJob() : fails trying to run backup job without retention 1`] = `
Object {
"data": Object {
"mode": "full",
@@ -112,7 +112,7 @@ Object {
}
`;
exports[`backupNg .runJob() : fails trying to run backup job with remotes without exportRetention 2`] = `
exports[`backupNg .runJob() : fails trying to run backup job without retention 2`] = `
Object {
"data": Object {
"id": Any<String>,

View File

@@ -224,7 +224,7 @@ describe("backupNg", () => {
expect(vmTask.data.id).toBe(vmIdWithoutDisks);
});
it("fails trying to run backup job with remotes without exportRetention", async () => {
it("fails trying to run backup job without retentions", async () => {
const scheduleTempId = randomId();
const { id: jobId } = await xo.createTempBackupNgJob({
...defaultBackupNg,
@@ -238,6 +238,9 @@ describe("backupNg", () => {
...defaultBackupNg.settings,
[scheduleTempId]: {},
},
srs: {
id: config.srs.defaultSr,
},
});
const schedule = await xo.getSchedule({ jobId });