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

There should be a way to define the target from a cmdline argument or an env variable #23

Closed
soarez opened this issue Nov 24, 2015 · 3 comments

Comments

@soarez
Copy link

soarez commented Nov 24, 2015

Any guidelines for a PR on this?

@hassy
Copy link
Member

hassy commented Nov 24, 2015

This would be awesome. How about a command line switch to minigun that allows the user to overwrite any field in the config section. Something like this to override config.target.

minigun run --config 'target=http://app.local' myscript.json

or like this to override a default header:

minigun run --config 'defaults.headers["x-custom-header"]=1234567890' myscript.json

A perhaps cleaner alternative is to use JSONPath to select the path to be modified (since JSONPath is already used for parsing and capturing responses inside scenarios). Something like this:

minigun run --config '$.target' 'http://app.local' myscript.json # where $ is the config object

Thoughts?

@soarez
Copy link
Author

soarez commented Nov 24, 2015

commander offers no support for using multiple instances of the same command line flag. i.e. it wouldn't be possible to

minigun run --config '<override target>' --config '<override headers>' my script.yml

So unless we go with another cmdline args parser, we will only be able to override one option with this interface.

I only need to override the target, I'm not sure if overriding other things is really all that necessary.

The reason I need to override the target is because multiple machines are running the same API, and I routinely need to bench them and compare them. Right now, it's very hard to script this. If you think this scenario might not be that uncommon, then maybe:

minion run myscript.yml optional_target

or

minigun run -p target myscript.yml

These would override the target on the script and can also make them not necessary i.e. you could define them in either place.

What do you think?

@hassy
Copy link
Member

hassy commented Nov 24, 2015

Can we make it --target? +1 on actually not needing to be able to override everything yet.

soarez added a commit to soarez/minigun that referenced this issue Nov 24, 2015
@soarez soarez mentioned this issue Nov 24, 2015
@hassy hassy closed this as completed Nov 24, 2015
hassy pushed a commit that referenced this issue Dec 11, 2022
hassy added a commit that referenced this issue Jan 16, 2023
Enable SSL + Certificate Authority self-signed
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

No branches or pull requests

2 participants