Skip to content

Commit

Permalink
Enable external plugins to test the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed May 3, 2023
1 parent a188bf9 commit 9364d90
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Run Test
# external-plugins tests only run on schedule
if: github.event_name == 'schedule' || matrix.test_suite != 'external-plugins'
# if: github.event_name == 'schedule' || matrix.test_suite != 'external-plugins'
env:
AKISMET_KEY: ${{ secrets.AKISMET_KEY }}
run: npm run ci -- ${{ matrix.test_suite }}
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/peertube-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ rm -rf ./dist
rm -rf ./dist
mkdir ./dist

./node_modules/.bin/esbuild ./peertube-runner.ts --bundle --platform=node --external:"./lib-cov/fluent-ffmpeg" --external:pg-hstore --outfile=dist/peertube-runner.js
./node_modules/.bin/esbuild ./peertube-runner.ts --bundle --platform=node --target=node14 --external:"./lib-cov/fluent-ffmpeg" --external:pg-hstore --outfile=dist/peertube-runner.js
7 changes: 6 additions & 1 deletion server/lib/job-queue/job-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export type CreateJobArgument =
export type CreateJobOptions = {
delay?: number
priority?: number
failParentOnFailure?: boolean
}

const handlers: { [id in JobType]: (job: Job) => Promise<any> } = {
Expand Down Expand Up @@ -363,7 +364,11 @@ class JobQueue {
name: 'job',
data: job.payload,
queueName: job.type,
opts: this.buildJobOptions(job.type as JobType, pick(job, [ 'priority', 'delay' ]))
opts: {
failParentOnFailure: true,

...this.buildJobOptions(job.type as JobType, pick(job, [ 'priority', 'delay', 'failParentOnFailure' ]))
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion server/tests/api/videos/resumable-upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('Test resumable upload', function () {
async function checkFileSize (uploadIdArg: string, expectedSize: number | null) {
const uploadId = uploadIdArg.replace(/^upload_id=/, '')

const subPath = join('tmp', 'resumable-uploads', uploadId)
const subPath = join('tmp', 'resumable-uploads', `${rootId}-${uploadId}.mp4`)
const filePath = server.servers.buildDirectory(subPath)
const exists = await pathExists(filePath)

Expand Down
2 changes: 1 addition & 1 deletion server/tests/cli/create-import-video-file-job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function runTests (objectStorage: boolean) {
})

it('Should run a import job on video 1 with a lower resolution', async function () {
const command = `npm run create-import-video-file-job -- -v ${video1ShortId} -i server/tests/fixtures/video_short-480.webm`
const command = `npm run create-import-video-file-job -- -v ${video1ShortId} -i server/tests/fixtures/video_short_480.webm`
await servers[0].cli.execWithEnv(command)

await waitJobs(servers)
Expand Down

0 comments on commit 9364d90

Please sign in to comment.