Compare commits
No commits in common. "429de1eaedf1da83f1e0e3ac3d8b20e771b7051c" and "713f5b2426f628b96e57f30f841fb59927f2de1a" have entirely different histories.
429de1eaed
...
713f5b2426
@ -19,9 +19,12 @@ import { PubSub } from 'apollo-server-express';
|
|||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
TypeOrmModule.forFeature([PipelineTask, Pipeline]),
|
TypeOrmModule.forFeature([PipelineTask, Pipeline]),
|
||||||
BullModule.registerQueue({
|
BullModule.registerQueue(
|
||||||
|
{
|
||||||
name: PIPELINE_TASK_QUEUE,
|
name: PIPELINE_TASK_QUEUE,
|
||||||
}),
|
},
|
||||||
|
{ name: PIPELINE_TASK_LOG_QUEUE },
|
||||||
|
),
|
||||||
RedisModule,
|
RedisModule,
|
||||||
ReposModule,
|
ReposModule,
|
||||||
],
|
],
|
||||||
|
@ -32,7 +32,6 @@ describe('PipelineTasksService', () => {
|
|||||||
({
|
({
|
||||||
pipelineId: 'test',
|
pipelineId: 'test',
|
||||||
commit: 'test',
|
commit: 'test',
|
||||||
pipeline: { branch: 'master' },
|
|
||||||
units: [],
|
units: [],
|
||||||
} as PipelineTask);
|
} as PipelineTask);
|
||||||
|
|
||||||
@ -80,7 +79,6 @@ describe('PipelineTasksService', () => {
|
|||||||
jest
|
jest
|
||||||
.spyOn(taskRepository, 'create')
|
.spyOn(taskRepository, 'create')
|
||||||
.mockImplementation((data: any) => data);
|
.mockImplementation((data: any) => data);
|
||||||
jest.spyOn(taskRepository, 'findOne').mockImplementation(async () => null);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be defined', () => {
|
it('should be defined', () => {
|
||||||
@ -105,7 +103,6 @@ describe('PipelineTasksService', () => {
|
|||||||
const save = jest
|
const save = jest
|
||||||
.spyOn(taskRepository, 'save')
|
.spyOn(taskRepository, 'save')
|
||||||
.mockImplementation(async (data: any) => data);
|
.mockImplementation(async (data: any) => data);
|
||||||
const findOne = jest.spyOn(taskRepository, 'findOne');
|
|
||||||
jest
|
jest
|
||||||
.spyOn(service, 'doNextTask')
|
.spyOn(service, 'doNextTask')
|
||||||
.mockImplementation(async () => undefined);
|
.mockImplementation(async () => undefined);
|
||||||
@ -115,7 +112,6 @@ describe('PipelineTasksService', () => {
|
|||||||
commit: 'test',
|
commit: 'test',
|
||||||
units: [],
|
units: [],
|
||||||
});
|
});
|
||||||
expect(findOne).toBeCalled();
|
|
||||||
});
|
});
|
||||||
it('add task', async () => {
|
it('add task', async () => {
|
||||||
const lpush = jest.spyOn(redisClient, 'lpush');
|
const lpush = jest.spyOn(redisClient, 'lpush');
|
||||||
|
Loading…
Reference in New Issue
Block a user