chore: delete useless test (#105)
This commit is contained in:
@@ -95,43 +95,6 @@ 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 srs without copyRetention 1`] = `
|
||||
Object {
|
||||
"data": Object {
|
||||
"mode": "full",
|
||||
"reportWhen": "never",
|
||||
},
|
||||
"end": Any<Number>,
|
||||
"id": Any<String>,
|
||||
"jobId": Any<String>,
|
||||
"jobName": "default-backupNg",
|
||||
"message": "backup",
|
||||
"scheduleId": Any<String>,
|
||||
"start": Any<Number>,
|
||||
"status": "failure",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`backupNg .runJob() : fails trying to run backup job with srs without copyRetention 2`] = `
|
||||
Object {
|
||||
"data": Object {
|
||||
"id": Any<String>,
|
||||
"type": "VM",
|
||||
},
|
||||
"end": Any<Number>,
|
||||
"id": Any<String>,
|
||||
"message": Any<String>,
|
||||
"result": Object {
|
||||
"message": "copy, export and snapshot retentions cannot both be 0",
|
||||
"name": "Error",
|
||||
"stack": Any<String>,
|
||||
},
|
||||
"start": Any<Number>,
|
||||
"status": "failure",
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
exports[`backupNg .runJob() : fails trying to run backup job with remotes without exportRetention 1`] = `
|
||||
Object {
|
||||
"data": Object {
|
||||
|
||||
@@ -276,59 +276,6 @@ describe("backupNg", () => {
|
||||
});
|
||||
expect(task.data.id).toBe(config.vmIdXoTest);
|
||||
});
|
||||
|
||||
it("fails trying to run backup job with srs without copyRetention", async () => {
|
||||
const scheduleTempId = randomId();
|
||||
const { id: jobId } = await xo.createTempBackupNgJob({
|
||||
...defaultBackupNg,
|
||||
schedules: {
|
||||
[scheduleTempId]: DEFAULT_SCHEDULE,
|
||||
},
|
||||
settings: {
|
||||
...defaultBackupNg.settings,
|
||||
[scheduleTempId]: {},
|
||||
},
|
||||
srs: {
|
||||
id: config.srs.defaultSr,
|
||||
},
|
||||
});
|
||||
|
||||
const schedule = await xo.getSchedule({ jobId });
|
||||
expect(typeof schedule).toBe("object");
|
||||
await xo.call("backupNg.runJob", { id: jobId, schedule: schedule.id });
|
||||
|
||||
const [
|
||||
{
|
||||
tasks: [task],
|
||||
...log
|
||||
},
|
||||
] = await xo.call("backupNg.getLogs", {
|
||||
jobId,
|
||||
scheduleId: schedule.id,
|
||||
});
|
||||
|
||||
expect(log).toMatchSnapshot({
|
||||
end: expect.any(Number),
|
||||
id: expect.any(String),
|
||||
jobId: expect.any(String),
|
||||
scheduleId: expect.any(String),
|
||||
start: expect.any(Number),
|
||||
});
|
||||
|
||||
expect(task).toMatchSnapshot({
|
||||
data: {
|
||||
id: expect.any(String),
|
||||
},
|
||||
end: expect.any(Number),
|
||||
id: expect.any(String),
|
||||
message: expect.any(String),
|
||||
result: {
|
||||
stack: expect.any(String),
|
||||
},
|
||||
start: expect.any(Number),
|
||||
});
|
||||
expect(task.data.id).toBe(config.vmIdXoTest);
|
||||
});
|
||||
});
|
||||
|
||||
test("execute three times a rolling snapshot with 2 as retention & revert to an old state", async () => {
|
||||
|
||||
Reference in New Issue
Block a user