From 7c456009be9f1ebef610b95ee21704cefd074476 Mon Sep 17 00:00:00 2001 From: Ana Gelez Date: Mon, 10 Aug 2020 16:47:13 +0200 Subject: [PATCH] Fix Selenium address, remove volumes --- .drone.jsonnet | 12 +----------- script/browser_test/utils.py | 3 ++- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index e1819dd7..cb9f440a 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -140,11 +140,7 @@ local Unit(db) = cachedPipeline( // PIPELINE 4: runs integration tests // It installs a local instance an run integration test with Python scripts // that use Selenium (located in scripts/browser_test). -local Integration(db) = { - volumes: [ - { name: 'webdriver-socket', temp: {}, }, - ] -} + basePipeline( +local Integration(db) = basePipeline( "integration-" + db, [ restoreCache, @@ -153,9 +149,6 @@ local Integration(db) = { name: 'selenium', image: 'elgalu/selenium:latest', detach: true, - volumes: [ - { name: 'webdriver-socket', path: '/wd' }, - ] }, { name: "integration-" + db, @@ -164,9 +157,6 @@ local Integration(db) = { BROWSER: "firefox", DATABASE_URL: if db == "postgres" then "postgres://plume:password@start-db/plume" else "plume.db", }, - volumes: [ - { name: 'webdriver-socket', path: '/wd' }, - ], commands: [ // Install the front-end "cargo web deploy -p plume-front", diff --git a/script/browser_test/utils.py b/script/browser_test/utils.py index df07eb1f..c80584a6 100644 --- a/script/browser_test/utils.py +++ b/script/browser_test/utils.py @@ -13,7 +13,8 @@ class Browser(unittest.TestCase): raise Exception("No browser was requested") capabilities['acceptSslCerts'] = True self.driver = webdriver.Remote( - command_executor='http://localhost:24444/wd/hub', + # The "selenium" address is set up by Drone CI and "points" to the container running selenium + command_executor='http://selenium:24444/wd/hub', desired_capabilities=capabilities) def tearDown(self): self.driver.close()