Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
bug: fixed issue where xauth not found, preventing xvfb from starting
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
  • Loading branch information
VietND96 committed Jan 29, 2024
1 parent d76dc4c commit a9dc7b7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ chart_build:
VERSION=$(TAG_VERSION) ./tests/charts/make/chart_build.sh

chart_test_https:
SELENIUM_GRID_PROTOCOL=https SELENIUM_GRID_PORT=443 make chart_test
SELENIUM_GRID_TEST_HEADLESS=true SELENIUM_GRID_PROTOCOL=https SELENIUM_GRID_PORT=443 make chart_test

chart_test: chart_test_template \
chart_test_chrome \
Expand All @@ -461,7 +461,7 @@ chart_test_edge:
./tests/charts/make/chart_test.sh NodeEdge

chart_test_parallel_autoscaling_https:
SELENIUM_GRID_PROTOCOL=https SELENIUM_GRID_PORT=443 make chart_test_parallel_autoscaling
SELENIUM_GRID_TEST_HEADLESS=true SELENIUM_GRID_PROTOCOL=https SELENIUM_GRID_PORT=443 make chart_test_parallel_autoscaling

chart_test_parallel_autoscaling:
VERSION=$(TAG_VERSION) VIDEO_TAG=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) UPLOADER_TAG=$(RCLONE_TAG_VERSION)-$(BUILD_DATE) NAMESPACE=$(NAMESPACE) \
Expand Down
1 change: 1 addition & 0 deletions NodeBase/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ USER root
RUN apt-get update -qqy \
&& apt-get -qqy --no-install-recommends install \
xvfb \
xauth \
pulseaudio \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

Expand Down
7 changes: 7 additions & 0 deletions tests/SeleniumTests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
SELENIUM_GRID_PROTOCOL = os.environ.get('SELENIUM_GRID_PROTOCOL', 'http')
SELENIUM_GRID_HOST = os.environ.get('SELENIUM_GRID_HOST', 'localhost')
SELENIUM_GRID_PORT = os.environ.get('SELENIUM_GRID_PORT', '4444')
SELENIUM_GRID_TEST_HEADLESS = os.environ.get('SELENIUM_GRID_TEST_HEADLESS', 'false').lower() == 'true'
WEB_DRIVER_WAIT_TIMEOUT = int(os.environ.get('WEB_DRIVER_WAIT_TIMEOUT', 60))

class SeleniumGenericTests(unittest.TestCase):
Expand Down Expand Up @@ -100,6 +101,8 @@ def setUp(self):
options.enable_downloads = True
options.add_argument('disable-features=DownloadBubble,DownloadBubbleV2')
options.set_capability('se:recordVideo', True)
if SELENIUM_GRID_TEST_HEADLESS:
options.add_argument('--headless=new')
self.driver = webdriver.Remote(
options=options,
command_executor="%s://%s:%s" % (SELENIUM_GRID_PROTOCOL,SELENIUM_GRID_HOST,SELENIUM_GRID_PORT)
Expand All @@ -111,6 +114,8 @@ def setUp(self):
options.enable_downloads = True
options.add_argument('disable-features=DownloadBubble,DownloadBubbleV2')
options.set_capability('se:recordVideo', True)
if SELENIUM_GRID_TEST_HEADLESS:
options.add_argument('--headless=new')
self.driver = webdriver.Remote(
options=options,
command_executor="%s://%s:%s" % (SELENIUM_GRID_PROTOCOL,SELENIUM_GRID_HOST,SELENIUM_GRID_PORT)
Expand All @@ -126,6 +131,8 @@ def setUp(self):
options.profile = profile
options.enable_downloads = True
options.set_capability('se:recordVideo', True)
if SELENIUM_GRID_TEST_HEADLESS:
options.add_argument('-headless')
self.driver = webdriver.Remote(
options=options,
command_executor="%s://%s:%s" % (SELENIUM_GRID_PROTOCOL,SELENIUM_GRID_HOST,SELENIUM_GRID_PORT)
Expand Down
1 change: 1 addition & 0 deletions tests/charts/make/chart_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export RUN_IN_DOCKER_COMPOSE=true
export HUB_CHECKS_INTERVAL=${HUB_CHECKS_INTERVAL}
export HUB_CHECKS_MAX_ATTEMPTS=${HUB_CHECKS_MAX_ATTEMPTS}
export WEB_DRIVER_WAIT_TIMEOUT=${WEB_DRIVER_WAIT_TIMEOUT}
export SELENIUM_GRID_TEST_HEADLESS=${SELENIUM_GRID_TEST_HEADLESS:-"false"}
./tests/bootstrap.sh ${MATRIX_BROWSER}

echo "Get pods status"
Expand Down

0 comments on commit a9dc7b7

Please sign in to comment.