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

Add an optional environment variable for docker images in order to easily and globally configure additional startup flags #2649

Merged

Conversation

abdallahghdiri
Copy link

Description

Add an optional environment variable in karate docker images that when set add its value as additional flags to browsers' startup command.

@@ -16,6 +16,7 @@ if [ -z "$KARATE_SOCAT_START" ]
export KARATE_SOCAT_START="true"
export KARATE_CHROME_PORT="9223"
fi
[ -z "$KARATE_BROWSER_ADDITIONAL_FLAGS" ] && export KARATE_BROWSER_ADDITIONAL_FLAGS=""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the delay, can we rename to KARATE_CHROME_ADD_OPTIONS just to be similar to the driver option key name here: https://github.com/karatelabs/karate/tree/master/karate-core#configure-driver

else I think this is good to go will merge 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate your point on having the name generic, I do feel that it is not practical to normalize the command line options for all browsers and the images are likely to remain browser specific, e.g. karate-chrome.

on second thoughts, KARATE_ADD_OPTIIONS should be good enough. sorry I tend to be fussy about names, but you can take a final call

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KARATE_DRIVER_ADD_OPTIONS should be good I think

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually no, DRIVER is client and end executable is browser. you can choose between KARATE_CHROME_ADD_OPTIONS and KARATE_BROWSER_ADD_OPTIONS

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no worries i agree that naming is important. let's go with KARATE_CHROME_ADD_OPTIONS if the images will stay chrome specific.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i added a new commit with new name change

@ptrthomas ptrthomas merged commit bc1df10 into karatelabs:develop Feb 9, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants