diff --git a/conda-store-server/conda_store_server/server/app.py b/conda-store-server/conda_store_server/server/app.py index a61e033f6..16126d9c9 100644 --- a/conda-store-server/conda_store_server/server/app.py +++ b/conda-store-server/conda_store_server/server/app.py @@ -123,5 +123,12 @@ def after_request_function(response): app.conda_store.db, app.conda_store.store_directory ) app.conda_store.ensure_conda_channels() + app.conda_store.session_factory.remove() + + # schedule tasks + app.conda_store.celery_app + + from conda_store_server.worker import tasks + (tasks.task_watch_paths.si()).apply_async() app.run(debug=True, host=self.address, port=self.port) diff --git a/conda-store-server/conda_store_server/worker/tasks.py b/conda-store-server/conda_store_server/worker/tasks.py index 66bfa4b7e..3efd18e8b 100644 --- a/conda-store-server/conda_store_server/worker/tasks.py +++ b/conda-store-server/conda_store_server/worker/tasks.py @@ -24,6 +24,8 @@ def task_watch_paths(): worker.conda_store.register_environment( specification=yaml.safe_load(f), namespace="filesystem" ) + import time + time.sleep(10) worker.conda_store.session_factory.remove() diff --git a/tests/e2e/cypress/integration/main.js b/tests/e2e/cypress/integration/main.js index 272776c2b..8bb1ba84c 100644 --- a/tests/e2e/cypress/integration/main.js +++ b/tests/e2e/cypress/integration/main.js @@ -1,13 +1,18 @@ describe('First Test', () => { it('Check conda-store home page', () => { + // display home page without login cy.visit('/conda-store/'); + // visit login page cy.visit('/conda-store/login/') + // click on sign in with jupyterhub + // login through jupyterhub oauth server cy.get('#login > a') .should('contain', 'Sign in with JupyterHub') .click(); + // fill in username and password and submit cy.get('#username_input') .type('conda-store-test');