mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 17:24:01 -05:00
Enable Python Integration Tests For Notebooks (#5090)
* Enable python notebook tests * change run_python3_test to be string * Add explicit pyspark check
This commit is contained in:
@@ -104,6 +104,8 @@ const ENVAR_STANDALONE_SERVER = 'STANDALONE_SQL';
|
||||
const ENVAR_STANDALONE_SERVER_USERNAME = 'STANDALONE_SQL_USERNAME';
|
||||
const ENVAR_STANDALONE_SERVER_PASSWORD = 'STANDALONE_SQL_PWD';
|
||||
const ENVAR_PYTHON_INSTALL_PATH = 'PYTHON_TEST_PATH';
|
||||
const ENVAR_RUN_PYTHON3_TEST = 'RUN_PYTHON3_TEST';
|
||||
const ENVAR_RUN_PYSPARK_TEST = 'RUN_PYSPARK_TEST';
|
||||
|
||||
// Mapping between AKV secret and the environment variable names
|
||||
const SecretEnVarMapping = [];
|
||||
@@ -119,6 +121,8 @@ SecretEnVarMapping.push([SECRET_STANDALONE_SERVER_USERNAME, ENVAR_STANDALONE_SER
|
||||
|
||||
// Set the values that are not stored in AKV here
|
||||
process.env[ENVAR_PYTHON_INSTALL_PATH] = NOTEBOOK_PYTHON_INSTALL_PATH;
|
||||
process.env[ENVAR_RUN_PYTHON3_TEST] = '1';
|
||||
process.env[ENVAR_RUN_PYSPARK_TEST] = '0';
|
||||
|
||||
const promises = [];
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ if (context.RunTest) {
|
||||
await verifyClearAllOutputs(notebook);
|
||||
});
|
||||
|
||||
if (process.env.RUN_PYTHON3_TEST === '1') {
|
||||
if (process.env['RUN_PYTHON3_TEST'] === '1') {
|
||||
test('Python3 notebook test', async function () {
|
||||
let notebook = await openNotebook(pySparkNotebookContent, pythonKernelMetadata, this.test.title);
|
||||
let cellOutputs = notebook.document.cells[0].contents.outputs;
|
||||
@@ -86,7 +86,7 @@ if (context.RunTest) {
|
||||
});
|
||||
}
|
||||
|
||||
if (process.env.RUN_PYSPARK_TEST === '1') {
|
||||
if (process.env['RUN_PYSPARK_TEST'] === '1') {
|
||||
test('PySpark3 notebook test', async function () {
|
||||
let notebook = await openNotebook(pySparkNotebookContent, pySpark3KernelMetadata, this.test.title);
|
||||
let cellOutputs = notebook.document.cells[0].contents.outputs;
|
||||
|
||||
Reference in New Issue
Block a user