Skip to content

Commit

Permalink
another try
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Oct 22, 2024
1 parent d127e61 commit 7fa557e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/lib/setup/setupBackup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class BackupRestore {
/** Regex to replace all occurrences of the HOSTNAME_PLACEHOLDER */
private readonly HOSTNAME_PLACEHOLDER_REGEX = /\$\$__hostname__\$\$/g;
/** Postfix for backup name */
private readonly BACKUP_POSTFIX = `_backup${tools.appName}`;
private readonly BACKUP_POSTFIX = `_backup${tools.appNameLowerCase}`;

constructor(options: CLIBackupRestoreOptions) {
options = options || {};
Expand Down
5 changes: 1 addition & 4 deletions packages/controller/test/lib/testConsole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,13 +584,10 @@ export function register(it: Mocha.TestFunction, expect: Chai.ExpectStatic, cont
const name = Math.round(Math.random() * 10_000).toString();
res = await execAsync(`"${process.execPath}" "${iobExecutable}" backup ${name}`);
expect(res.stderr).to.be.not.ok;
expect(fs.existsSync(`${BackupRestore.getBackupDir() + name}.tar.gz`)).to.be.true;
expect(fs.existsSync(`${BackupRestore.getBackupDir() + name}_backupiobroker.tar.gz`)).to.be.true;
}).timeout(20_000);

it(`${testName}validates backup`, async () => {
// create a backup
await execAsync(`"${process.execPath}" "${iobExecutable}" backup`);
// and validate it
const res = await execAsync(`"${process.execPath}" "${iobExecutable}" validate 0`);
expect(res.stderr).to.be.not.ok;
expect(res.stdout).to.include('Backup OK');
Expand Down

0 comments on commit 7fa557e

Please sign in to comment.