-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(chart): Append subPath to ENV variable SE_NODE_GRID_URL (#2053)
Signed-off-by: Viet Nguyen Duc <[email protected]>
- Loading branch information
Showing
4 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,9 @@ ingress: | |
|
||
isolateComponents: true | ||
|
||
components: | ||
subPath: *gridAppRoot | ||
|
||
chromeNode: | ||
affinity: *affinity | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,28 @@ def test_ingress_nginx_annotations(self): | |
count += 1 | ||
self.assertEqual(count, len(resources_name), "No ingress resources found") | ||
|
||
def test_sub_path_append_to_node_grid_url(self): | ||
resources_name = ['selenium-node-config'] | ||
count = 0 | ||
for doc in LIST_OF_DOCUMENTS: | ||
if doc['metadata']['name'] in resources_name and doc['kind'] == 'ConfigMap': | ||
logger.info(f"Assert subPath is appended to node grid url") | ||
self.assertTrue(doc['data']['SE_NODE_GRID_URL'] == 'http://admin:[email protected]:4444/selenium') | ||
count += 1 | ||
self.assertEqual(count, len(resources_name), "No node config resources found") | ||
|
||
def test_sub_path_set_to_grid_env_var(self): | ||
resources_name = ['selenium-router'] | ||
is_present = False | ||
for doc in LIST_OF_DOCUMENTS: | ||
if doc['metadata']['name'] in resources_name and doc['kind'] == 'Deployment': | ||
logger.info(f"Assert subPath is set to grid ENV variable") | ||
list_env = doc['spec']['template']['spec']['containers'][0]['env'] | ||
for env in list_env: | ||
if env['name'] == 'SE_SUB_PATH' and env['value'] == '/selenium': | ||
is_present = True | ||
self.assertTrue(is_present, "ENV variable SE_SUB_PATH is not populated") | ||
|
||
if __name__ == '__main__': | ||
failed = False | ||
try: | ||
|