Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove xvfb dependency #412

Merged
merged 1 commit into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ WORKDIR /usr/src/app

# Install packages depending on ENV arg from docker-compose
ARG BASE_PACKAGES="gcc libpq-dev libjpeg62-turbo-dev libsqlite3-0 zlib1g-dev"
ARG DEV_PACKAGES="firefox-esr xvfb"
ARG DEV_PACKAGES="firefox-esr"
RUN if [ "$IS_PROD" = "true" ]; then \
PACKAGES_TO_INSTALL="$BASE_PACKAGES"; \
else \
Expand Down
10 changes: 3 additions & 7 deletions OpenOversight/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from selenium.webdriver.firefox.webdriver import WebDriver as Firefox
from sqlalchemy.orm import scoped_session, sessionmaker
from webdriver_manager.firefox import GeckoDriverManager
from xvfbwrapper import Xvfb

from OpenOversight.app import create_app
from OpenOversight.app.models.database import (
Expand Down Expand Up @@ -901,12 +900,10 @@ def server(app, server_port):

@pytest.fixture(scope="session")
def browser(app, server):
# start headless webdriver
vdisplay = Xvfb()
vdisplay.start()

options = FirefoxOptions()
options.headless = True
options.add_argument("--headless")
options.add_argument("--width=1024")
options.add_argument("--height=768")

service = FirefoxService(
executable_path=GeckoDriverManager().install(), log_path="/tmp/geckodriver.log"
Expand All @@ -917,4 +914,3 @@ def browser(app, server):

# shutdown headless webdriver
driver.quit()
vdisplay.stop()
12 changes: 1 addition & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ selenium = "4.17.2"
sphinx = "7.0.1"
sphinx-autobuild = "2021.3.14"
webdriver-manager = "3.8.6"
xvfbwrapper = "0.2.9"

[build-system]
requires = ["poetry-core"]
Expand Down
Loading