From 338cacdb7a130a4c827a9e55df70c5f24428b8e3 Mon Sep 17 00:00:00 2001 From: PrabalSingh Date: Mon, 25 May 2020 19:21:59 +0530 Subject: [PATCH] test: fix imports due to refactoring of jobs --- test/run/run.c.spec.ts | 3 ++- test/run/run.cpp.spec.ts | 3 ++- test/run/run.csharp.spec.ts | 3 ++- test/run/run.java8.spec.ts | 3 ++- test/run/run.nodejs10.spec.ts | 3 ++- test/run/run.nodejs8.spec.ts | 3 ++- test/run/run.py2.spec.ts | 3 ++- test/run/run.py3.spec.ts | 3 ++- test/run/run.ruby.spec.ts | 3 ++- test/scenarios/projectScenario.spec.ts | 18 +++++++++--------- test/scenarios/runScenario.spec.ts | 2 +- test/scenarios/submissionScenario.spec.ts | 2 +- test/submission/submit.c.spec.ts | 2 +- test/submission/submit.cpp.spec.ts | 2 +- test/submission/submit.csharp.spec.ts | 2 +- test/submission/submit.java8.spec.ts | 2 +- test/submission/submit.nodejs10.spec.ts | 2 +- test/submission/submit.nodejs8.spec.ts | 2 +- test/submission/submit.py2.spec.ts | 2 +- test/submission/submit.py3.spec.ts | 2 +- test/submission/submit.ruby.spec.ts | 2 +- 21 files changed, 38 insertions(+), 29 deletions(-) diff --git a/test/run/run.c.spec.ts b/test/run/run.c.spec.ts index 3010a36..5db67e2 100644 --- a/test/run/run.c.spec.ts +++ b/test/run/run.c.spec.ts @@ -1,6 +1,7 @@ import {execute} from '../../src/tasks/' import {expect} from 'chai' -import { RunJob } from '../../src/tasks/job' +import {RunJob} from '../../src/tasks/jobs/run'; + describe('run - c', () => { it('.c file runs correctly', async () => { const runResult = await execute(new RunJob({ diff --git a/test/run/run.cpp.spec.ts b/test/run/run.cpp.spec.ts index 8987b7b..63025e1 100644 --- a/test/run/run.cpp.spec.ts +++ b/test/run/run.cpp.spec.ts @@ -1,6 +1,7 @@ import {execute} from '../../src/tasks/' import {expect} from 'chai' -import { RunJob } from '../../src/tasks/job' +import {RunJob} from '../../src/tasks/jobs/run'; + describe('run - cpp', () => { it('.cpp file runs correctly', async () => { diff --git a/test/run/run.csharp.spec.ts b/test/run/run.csharp.spec.ts index 6cb50b2..e21c37c 100644 --- a/test/run/run.csharp.spec.ts +++ b/test/run/run.csharp.spec.ts @@ -1,6 +1,7 @@ import {execute} from '../../src/tasks/' import {expect} from 'chai' -import { RunJob } from '../../src/tasks/job' +import {RunJob} from '../../src/tasks/jobs/run'; + describe('run - csharp', () => { it('.cs file runs correctly', async () => { diff --git a/test/run/run.java8.spec.ts b/test/run/run.java8.spec.ts index 2017918..fee8983 100644 --- a/test/run/run.java8.spec.ts +++ b/test/run/run.java8.spec.ts @@ -1,6 +1,7 @@ import {execute} from '../../src/tasks/' import {expect} from 'chai' -import { RunJob } from '../../src/tasks/job' +import {RunJob} from '../../src/tasks/jobs/run'; + describe('run - java8', () => { it('.java file runs correctly (Java8)', async () => { diff --git a/test/run/run.nodejs10.spec.ts b/test/run/run.nodejs10.spec.ts index 50a90b1..209e26f 100644 --- a/test/run/run.nodejs10.spec.ts +++ b/test/run/run.nodejs10.spec.ts @@ -1,6 +1,7 @@ import {execute} from '../../src/tasks/' import {expect} from 'chai' -import { RunJob } from '../../src/tasks/job' +import {RunJob} from '../../src/tasks/jobs/run'; + describe('run - nodejs10', () => { it('.js file runs correctly (NodeJS 6)', async () => { const runResult = await execute(new RunJob({ diff --git a/test/run/run.nodejs8.spec.ts b/test/run/run.nodejs8.spec.ts index f55bb4b..85c0d0a 100644 --- a/test/run/run.nodejs8.spec.ts +++ b/test/run/run.nodejs8.spec.ts @@ -1,6 +1,7 @@ import {execute} from '../../src/tasks/' import {expect} from 'chai' -import { RunJob } from '../../src/tasks/job' +import {RunJob} from '../../src/tasks/jobs/run'; + describe('run - nodejs8', () => { it('.js file runs correctly (NodeJS 8)', async () => { diff --git a/test/run/run.py2.spec.ts b/test/run/run.py2.spec.ts index 27a0d91..e530c11 100644 --- a/test/run/run.py2.spec.ts +++ b/test/run/run.py2.spec.ts @@ -1,6 +1,7 @@ import {execute} from '../../src/tasks/' import {expect} from 'chai' -import { RunJob } from '../../src/tasks/job' +import {RunJob} from '../../src/tasks/jobs/run'; + describe('run - py2', () => { it('.py file runs correctly (Python 2.7)', async () => { diff --git a/test/run/run.py3.spec.ts b/test/run/run.py3.spec.ts index 40f3a41..454ed1f 100644 --- a/test/run/run.py3.spec.ts +++ b/test/run/run.py3.spec.ts @@ -1,6 +1,7 @@ import {execute} from '../../src/tasks/' import {expect} from 'chai' -import { RunJob } from '../../src/tasks/job' +import {RunJob} from '../../src/tasks/jobs/run'; + describe('run - py3', () => { it('.py file runs correctly (Python 3.0)', async () => { diff --git a/test/run/run.ruby.spec.ts b/test/run/run.ruby.spec.ts index 6358584..84e40e3 100644 --- a/test/run/run.ruby.spec.ts +++ b/test/run/run.ruby.spec.ts @@ -1,6 +1,7 @@ import {execute} from '../../src/tasks/' import {expect} from 'chai' -import { RunJob } from '../../src/tasks/job' +import {RunJob} from '../../src/tasks/jobs/run'; + describe('run - ruby', () => { it('.rb file runs correctly', async () => { diff --git a/test/scenarios/projectScenario.spec.ts b/test/scenarios/projectScenario.spec.ts index 710d7be..92a8fb3 100644 --- a/test/scenarios/projectScenario.spec.ts +++ b/test/scenarios/projectScenario.spec.ts @@ -1,16 +1,16 @@ import { expect } from 'chai' -import { ProjectJob } from '../../src/tasks/job' +import { ProjectJob } from '../../src/tasks/jobs/project'; import ProjectScenarion from '../../src/tasks/scenarios/project' describe('Project Scenario', () => { it('should setup', async () => { - const job: ProjectJob = { - id: 1, - source: '', - lang: 'nodejs', - timelimit: 20, - scenario: 'problem', - problem: '' - } + // const job: ProjectJob = { + // id: 1, + // source: '', + // lang: 'nodejs', + // timelimit: 20, + // scenario: 'problem', + // problem: '' + // } }) }) diff --git a/test/scenarios/runScenario.spec.ts b/test/scenarios/runScenario.spec.ts index 172a16e..bf06851 100644 --- a/test/scenarios/runScenario.spec.ts +++ b/test/scenarios/runScenario.spec.ts @@ -3,7 +3,7 @@ import { mkdir, rm } from 'shelljs' import RunScenario from '../../src/tasks/scenarios/run' import config = require('../../config.js') import * as path from 'path' -import { RunJob } from '../../src/tasks/job' +import {RunJob} from '../../src/tasks/jobs/run'; import * as fs from 'fs' describe('Run Scenario', () => { diff --git a/test/scenarios/submissionScenario.spec.ts b/test/scenarios/submissionScenario.spec.ts index 86e5ad6..d7b487e 100644 --- a/test/scenarios/submissionScenario.spec.ts +++ b/test/scenarios/submissionScenario.spec.ts @@ -4,7 +4,7 @@ import { mkdir, rm } from 'shelljs' import config = require('../../config.js') import * as path from 'path' import SubmissionScenario from '../../src/tasks/scenarios/submission' -import { SubmitJob } from '../../src/tasks/job' +import { SubmitJob} from '../../src/tasks/jobs/submission'; describe('Submission Scenario', () => { it('should setup', async () => { diff --git a/test/submission/submit.c.spec.ts b/test/submission/submit.c.spec.ts index e42c72a..d97cfc9 100644 --- a/test/submission/submit.c.spec.ts +++ b/test/submission/submit.c.spec.ts @@ -1,6 +1,6 @@ import { execute } from '../../src/tasks/' import { expect } from 'chai' -import { SubmitJob } from '../../src/tasks/job' +import { SubmitJob } from "../../src/tasks/jobs/submission"; import { SubmissionResult } from '../../src/types/result' describe('submit - c', () => { diff --git a/test/submission/submit.cpp.spec.ts b/test/submission/submit.cpp.spec.ts index 39bd8c4..a7348c7 100644 --- a/test/submission/submit.cpp.spec.ts +++ b/test/submission/submit.cpp.spec.ts @@ -1,6 +1,6 @@ import { execute } from '../../src/tasks/' import { expect } from 'chai' -import { SubmitJob } from '../../src/tasks/job' +import { SubmitJob } from "../../src/tasks/jobs/submission"; import { SubmissionResult } from '../../src/types/result' describe('submit - cpp', () => { diff --git a/test/submission/submit.csharp.spec.ts b/test/submission/submit.csharp.spec.ts index 7bc2ed8..1efc1db 100644 --- a/test/submission/submit.csharp.spec.ts +++ b/test/submission/submit.csharp.spec.ts @@ -1,6 +1,6 @@ import { execute } from '../../src/tasks/' import { expect } from 'chai' -import { SubmitJob } from '../../src/tasks/job' +import { SubmitJob } from "../../src/tasks/jobs/submission"; import { SubmissionResult } from '../../src/types/result' describe('submit - csharp', () => { diff --git a/test/submission/submit.java8.spec.ts b/test/submission/submit.java8.spec.ts index 87d175b..7e83fb0 100644 --- a/test/submission/submit.java8.spec.ts +++ b/test/submission/submit.java8.spec.ts @@ -1,6 +1,6 @@ import { execute } from '../../src/tasks/' import { expect } from 'chai' -import { SubmitJob } from '../../src/tasks/job' +import { SubmitJob } from "../../src/tasks/jobs/submission"; import { SubmissionResult } from '../../src/types/result' describe('submit - java8', () => { diff --git a/test/submission/submit.nodejs10.spec.ts b/test/submission/submit.nodejs10.spec.ts index f7df9f1..359bd6c 100644 --- a/test/submission/submit.nodejs10.spec.ts +++ b/test/submission/submit.nodejs10.spec.ts @@ -1,6 +1,6 @@ import { execute } from '../../src/tasks/' import { expect } from 'chai' -import { SubmitJob } from '../../src/tasks/job' +import { SubmitJob } from "../../src/tasks/jobs/submission"; import { SubmissionResult } from '../../src/types/result' describe('submit - nodejs10', () => { diff --git a/test/submission/submit.nodejs8.spec.ts b/test/submission/submit.nodejs8.spec.ts index 9ecf188..8eaf668 100644 --- a/test/submission/submit.nodejs8.spec.ts +++ b/test/submission/submit.nodejs8.spec.ts @@ -1,6 +1,6 @@ import { execute } from '../../src/tasks/' import { expect } from 'chai' -import { SubmitJob } from '../../src/tasks/job' +import { SubmitJob } from "../../src/tasks/jobs/submission"; import { SubmissionResult } from '../../src/types/result' describe('submit - nodejs8', () => { diff --git a/test/submission/submit.py2.spec.ts b/test/submission/submit.py2.spec.ts index 9e260f2..94827da 100644 --- a/test/submission/submit.py2.spec.ts +++ b/test/submission/submit.py2.spec.ts @@ -1,6 +1,6 @@ import { execute } from '../../src/tasks/' import { expect } from 'chai' -import { SubmitJob } from '../../src/tasks/job' +import { SubmitJob } from "../../src/tasks/jobs/submission"; import { SubmissionResult } from '../../src/types/result' describe('submit - py2', () => { diff --git a/test/submission/submit.py3.spec.ts b/test/submission/submit.py3.spec.ts index 9898431..e79792d 100644 --- a/test/submission/submit.py3.spec.ts +++ b/test/submission/submit.py3.spec.ts @@ -1,6 +1,6 @@ import { execute } from '../../src/tasks/' import { expect } from 'chai' -import { SubmitJob } from '../../src/tasks/job' +import { SubmitJob } from "../../src/tasks/jobs/submission"; import { SubmissionResult } from '../../src/types/result' describe('submit - py3', () => { diff --git a/test/submission/submit.ruby.spec.ts b/test/submission/submit.ruby.spec.ts index c5c5702..97ec393 100644 --- a/test/submission/submit.ruby.spec.ts +++ b/test/submission/submit.ruby.spec.ts @@ -1,6 +1,6 @@ import { execute } from '../../src/tasks/' import { expect } from 'chai' -import { SubmitJob } from '../../src/tasks/job' +import { SubmitJob } from "../../src/tasks/jobs/submission"; import { SubmissionResult } from '../../src/types/result' describe('submit - ruby', () => {