-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented new Python Django devfile test
Signed-off-by: Tibor Dancs <tdancs@redhat.com>
- Loading branch information
Showing
7 changed files
with
70 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--timeout 2200000 | ||
--reporter 'dist/driver/CheReporter.js' | ||
-u tdd | ||
--bail | ||
--full-trace | ||
--spec dist/tests/login/Login.spec.js | ||
--spec dist/tests/devfiles/PythonDjango.spec.js | ||
--require source-map-support/register |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/********************************************************************* | ||
* Copyright (c) 2019 Red Hat, Inc. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
**********************************************************************/ | ||
import { NameGenerator } from '../../utils/NameGenerator'; | ||
import 'reflect-metadata'; | ||
import * as codeExecutionHelper from '../../testsLibrary/CodeExecutionTests'; | ||
import * as workspaceHandler from '../../testsLibrary/WorksapceHandlingTests'; | ||
import * as projectManager from '../../testsLibrary/ProjectAndFileTests'; | ||
|
||
const workspaceName: string = NameGenerator.generate('wksp-test-', 5); | ||
const workspaceStack: string = 'Python Django'; | ||
const workspaceSampleName: string = 'django-realworld-example-app'; | ||
const workspaceRootFolderName: string = 'conduit'; | ||
|
||
const taskInstallDependencies: string = 'install dependencies'; | ||
const taskMigrate: string = 'migrate'; | ||
const taskRunServer: string = 'run server'; | ||
const taskExpectedDialogText: string = 'A process is now listening on port 7000'; | ||
|
||
suite(`${workspaceStack} test`, async () => { | ||
|
||
suite(`Create ${workspaceStack} workspace ${workspaceName}`, async () => { | ||
workspaceHandler.createAndOpenWorkspace(workspaceName, workspaceStack); | ||
projectManager.waitWorkspaceReadiness(workspaceName, workspaceSampleName, workspaceRootFolderName); | ||
}); | ||
|
||
suite('Install dependencies', async () => { | ||
codeExecutionHelper.runTask(taskInstallDependencies, 60_000); | ||
codeExecutionHelper.closeTerminal(taskInstallDependencies); | ||
}); | ||
|
||
suite('Migrate Django application project', async () => { | ||
codeExecutionHelper.runTask(taskMigrate, 30_000); | ||
codeExecutionHelper.closeTerminal(taskMigrate); | ||
}); | ||
|
||
suite('Run django server', async () => { | ||
codeExecutionHelper.runTaskWithDialogShellAndOpenLink(taskRunServer, taskExpectedDialogText, 30_000); | ||
}); | ||
|
||
suite('Stop and remove workspace', async() => { | ||
workspaceHandler.stopWorkspace(workspaceName); | ||
workspaceHandler.removeWorkspace(workspaceName); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters