Skip to content

Commit

Permalink
[CI]: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed Jan 29, 2024
1 parent 751006e commit d69f588
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
12 changes: 6 additions & 6 deletions __tests__/unit/database/services/channel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('channel service', () => {
describe('createChannel', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should create a channel', async () => {
Expand All @@ -32,7 +32,7 @@ describe('channel service', () => {
describe('createChannels', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should create channels', async () => {
Expand Down Expand Up @@ -61,7 +61,7 @@ describe('channel service', () => {
describe('getChannel', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should retrieve an existing channel that match the filter criteria', async () => {
Expand All @@ -83,7 +83,7 @@ describe('channel service', () => {
describe('getChannels', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should retrieve channels that match the filter criteria', async () => {
Expand All @@ -106,7 +106,7 @@ describe('channel service', () => {
describe('updateChannel', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
const updateBody: IChannelUpdateBody = {
Expand Down Expand Up @@ -136,7 +136,7 @@ describe('channel service', () => {
describe('updateChannels', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
const updateBody: IChannelUpdateBody = {
Expand Down
16 changes: 8 additions & 8 deletions __tests__/unit/database/services/guildMember.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('guildMember service', () => {
describe('createGuidMember', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should create a guild member', async () => {
Expand All @@ -33,7 +33,7 @@ describe('guildMember service', () => {
describe('createGuidMembers', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should create guild members', async () => {
Expand Down Expand Up @@ -64,7 +64,7 @@ describe('guildMember service', () => {
describe('getGuildMember', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should retrieve an existing guild member that match the filter criteria', async () => {
Expand All @@ -86,7 +86,7 @@ describe('guildMember service', () => {
describe('getGuildMembers', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should retrieve guild members that match the filter criteria', async () => {
Expand All @@ -110,7 +110,7 @@ describe('guildMember service', () => {
describe('updateGuildMember', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
const updateBody: IGuildMemberUpdateBody = {
Expand Down Expand Up @@ -155,7 +155,7 @@ describe('guildMember service', () => {
describe('updateGuildMembers', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
const updateBody: IGuildMemberUpdateBody = {
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('guildMember service', () => {
describe('deleteGuildMember', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should delete guild member that match the filter criteria', async () => {
Expand All @@ -206,7 +206,7 @@ describe('guildMember service', () => {
describe('deleteGuildMembers', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should delete guild members that match the filter criteria', async () => {
Expand Down
16 changes: 8 additions & 8 deletions __tests__/unit/database/services/rawInfo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('rawInfo service', () => {
describe('createRawInfo', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should create a rawInfo', async () => {
Expand All @@ -33,7 +33,7 @@ describe('rawInfo service', () => {
describe('createRawInfos', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should create rawInfos (list of rawInfo)', async () => {
Expand Down Expand Up @@ -69,7 +69,7 @@ describe('rawInfo service', () => {
describe('getRawInfo', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should retrieve an existing rawInfo that matches the filter criteria', async () => {
Expand All @@ -92,7 +92,7 @@ describe('rawInfo service', () => {
describe('getRawInfos', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should retrieve rawInfo that matches the filter criteria', async () => {
Expand All @@ -116,7 +116,7 @@ describe('rawInfo service', () => {
describe('updateRawInfo', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
const updateBody: IRawInfoUpdateBody = {
Expand Down Expand Up @@ -151,7 +151,7 @@ describe('rawInfo service', () => {
describe('updateRawInfos', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
const updateBody: IRawInfoUpdateBody = {
Expand Down Expand Up @@ -190,7 +190,7 @@ describe('rawInfo service', () => {
describe('deleteRawInfo', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should delete rawInfo that matches the filter criteria', async () => {
Expand All @@ -212,7 +212,7 @@ describe('rawInfo service', () => {
describe('deleteRawInfos', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should delete rawInfo that matches the filter criteria', async () => {
Expand Down
12 changes: 6 additions & 6 deletions __tests__/unit/database/services/role.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('role service', () => {
describe('createRole', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should create a role', async () => {
Expand All @@ -32,7 +32,7 @@ describe('role service', () => {
describe('createRoles', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should create roles', async () => {
Expand Down Expand Up @@ -61,7 +61,7 @@ describe('role service', () => {
describe('getRole', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should retrieve an existing role that match the filter criteria', async () => {
Expand All @@ -83,7 +83,7 @@ describe('role service', () => {
describe('getRoles', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
test('should retrieve roles that match the filter criteria', async () => {
Expand All @@ -106,7 +106,7 @@ describe('role service', () => {
describe('updateRole', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
const updateBody: IRoleUpdateBody = {
Expand Down Expand Up @@ -136,7 +136,7 @@ describe('role service', () => {
describe('updateRoles', () => {
let connection: Connection;
beforeEach(async () => {
connection = await DatabaseManager.getInstance().getTenantDb('connection');
connection = await DatabaseManager.getInstance().getTenantDb('connection-1');
await connection.dropDatabase();
});
const updateBody: IRoleUpdateBody = {
Expand Down

0 comments on commit d69f588

Please sign in to comment.