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

In 'live' testing scenarios argument passing to build_tests is convoluted and SSL may not work #50

Closed
cdent opened this issue Jun 25, 2015 · 3 comments · Fixed by #153
Closed
Labels
Milestone

Comments

@cdent
Copy link
Owner

cdent commented Jun 25, 2015

If you want to use build_tests to create real TestCases against a live server it's likely you know the URL and that would be most convenient thing to pass instead of having to parse out the host, port and prefix (script_name) and then pass those.

In addition, if you have a URL you know if your server is SSL but the tests may not have been written to do SSL (with an ssl: true entry). Because of the test building process this is a bit awkward at the moment. It would be better to be able to say "yeah, this is SSL" for the whole run.

@cdent cdent added this to the 2.0 milestone Jun 25, 2015
@cdent
Copy link
Owner Author

cdent commented Nov 3, 2015

See also #105 which has related ssl things to say.

I suppose one way to do this is to add yet another argument (url or uri) which is mutually exclusive of host, port, prefix and intercept.

Such a lot of arguments though...

@cdent cdent added the critical label Apr 22, 2016
cdent added a commit that referenced this issue Jun 2, 2016
build_tests gains a require_ssl argument which, if set to True,
makes all the loaded test suites default to 'ssl: True'.

gabbi-run will interpret a target containing 'https' as meaning
that the tests in the provided yaml should default to 'ssl: True'.

Fixes: #50
Fixes: #105
Fixes: #138

The changes here are the naive basics to get the desired behavior.
There's an existing cleanup branch on which we can clean this up
later.
@cdent cdent closed this as completed in #139 Jun 2, 2016
@cdent
Copy link
Owner Author

cdent commented Jun 2, 2016

There's still part of this which is not done, which is just passing the url to gabbi instead of parsing beforehand.

@cdent cdent reopened this Jun 2, 2016
@cdent
Copy link
Owner Author

cdent commented Jun 2, 2016

One option for doing this that wouldn't need to extend the method signatures even more would be to have something like a url_to_kwargs method that returned a dict of host, port, require_ssl and prefix that could be passed straight into built_tests. Of course now that I've written that down it's probably just easier to pass url and if it is present it overrides all of those.

Opinions?

cdent added a commit that referenced this issue Jun 12, 2016
The value of url overrides host, port and prefix if it is set.
This will make some live testing scenarios more straightforward.

Fixes #50
cdent added a commit that referenced this issue Jun 12, 2016
The value of url overrides host, port and prefix if it is set.
This will make some live testing scenarios more straightforward.

Fixes #50
cdent added a commit that referenced this issue Jun 13, 2016
The value of url overrides host, port and prefix if it is set.
This will make some live testing scenarios more straightforward.

Fixes #50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant