Merge pull request #3417 from nichwall/series_cleanup_2

Add: series migration to be unique
This commit is contained in:
advplyr 2024-10-12 15:48:04 -05:00 committed by GitHub
commit e58d7db03b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 553 additions and 9 deletions

View file

@ -63,6 +63,8 @@ describe('MigrationManager', () => {
await migrationManager.init(serverVersion)
// Assert
expect(fsEnsureDirStub.calledOnce).to.be.true
expect(fsEnsureDirStub.calledWith(migrationManager.migrationsDir)).to.be.true
expect(migrationManager.serverVersion).to.equal(serverVersion)
expect(migrationManager.sequelize).to.equal(sequelizeStub)
expect(migrationManager.migrationsDir).to.equal(path.join(__dirname, 'migrations'))
@ -353,8 +355,6 @@ describe('MigrationManager', () => {
await migrationManager.copyMigrationsToConfigDir()
// Assert
expect(fsEnsureDirStub.calledOnce).to.be.true
expect(fsEnsureDirStub.calledWith(targetDir)).to.be.true
expect(readdirStub.calledOnce).to.be.true
expect(readdirStub.calledWith(migrationsSourceDir)).to.be.true
expect(fsCopyStub.calledTwice).to.be.true
@ -382,8 +382,6 @@ describe('MigrationManager', () => {
} catch (error) {}
// Assert
expect(fsEnsureDirStub.calledOnce).to.be.true
expect(fsEnsureDirStub.calledWith(targetDir)).to.be.true
expect(readdirStub.calledOnce).to.be.true
expect(readdirStub.calledWith(migrationsSourceDir)).to.be.true
expect(fsCopyStub.calledTwice).to.be.true