Skip to content

Commit

Permalink
test(chart): Add test for setting registry to pull images
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 Nov 30, 2023
1 parent dfed4b3 commit 0b3bdab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/K8s/chart_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ helm upgrade --install ${RELEASE_NAME} \
--set autoscaling.enableWithExistingKEDA=${SELENIUM_GRID_AUTOSCALING} \
--set autoscaling.scaledOptions.minReplicaCount=${SELENIUM_GRID_AUTOSCALING_MIN_REPLICA} \
--set global.seleniumGrid.imageTag=${VERSION} --set global.seleniumGrid.imageRegistry=${NAMESPACE} \
--set global.seleniumGrid.nodesImageTag=${VERSION} \
${CHART_PATH} --namespace ${SELENIUM_NAMESPACE} --create-namespace

echo "Run Tests"
Expand Down
7 changes: 4 additions & 3 deletions tests/SeleniumTests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,16 @@ def test_play_video(self):
def test_download_file(self):
driver = self.driver
driver.get('https://the-internet.herokuapp.com/download')
file_name = 'some-file.txt'
wait = WebDriverWait(driver, 30)
file_link = wait.until(
EC.element_to_be_clickable((By.LINK_TEXT, 'some-file.txt'))
EC.element_to_be_clickable((By.LINK_TEXT, file_name))
)
file_link.click()
wait.until(
lambda d: len(d.get_downloadable_files()) > 0
lambda d: str(d.get_downloadable_files()[0]).endswith(file_name)
)
self.assertTrue(len(driver.get_downloadable_files()) > 0)
self.assertTrue(str(driver.get_downloadable_files()[0]).endswith(file_name))

def tearDown(self):
self.driver.quit()
Expand Down

0 comments on commit 0b3bdab

Please sign in to comment.