117 Commits

Author SHA1 Message Date
Chris Dent
39095289e3 Release 1.27.0
* allow gabbi-run to accept multiple filenames as command args
2016-10-04 14:24:12 +01:00
Chris Dent
b1b0dfa546 Add some rudimentary docs for runner input files handling
This gets the basics in a very simplistic fashion.

What's missing is any indication of the availability of this feature
in the argparse created help (the output one sees from
gabbi-run --help). It's not clear what the best way to add this is,
since the feature is being managed outside argparse.
2016-10-04 11:58:42 +01:00
Chris Dent
f35df02ee8 Release 1.26.0
* switch to content-handlers
* add inner-fixtures
2016-09-29 09:35:51 +01:00
Chris Dent
df198c8849 Add doc for inner fixtures
This covers the basics without being too encouraging. We don't
want to be encouraging on this one.
2016-09-28 16:55:45 +01:00
Chris Dent
0419936f5d Merge branch 'content-handlers' of github.com:cdent/gabbi into content-handlers 2016-09-26 20:00:45 +01:00
FND
9203bc89c3 Fix heading level 2016-09-21 13:50:27 +02:00
Chris Dent
a9e16c7ae3 Release 1.25.0
- allow overriding of fully qualified test name via test_loader_name
2016-09-20 19:31:23 +01:00
Chris Dent
9cb72dbc43 Add some doc and FAQ about quieting pytest warnings (#172)
As it will take some time and effort to replace the existing yield
tests, add some hopefully helpful information on how to deal with
the warnings.
2016-09-20 19:28:19 +01:00
Chris Dent
80df8a8863 Release 1.24.1
* cast jsonpath match to string for regex match
* don't require mock in python >= 3.3
2016-09-06 21:55:36 +01:00
Chris Dent
2bd1c803b7 Add a FAQ about yaml anchors and aliases
They are black magic, but very useful.
2016-08-19 17:01:34 +01:00
Chris Dent
8db2f5ab27 Add the framework for including a FAQ in docs (#163)
Add a faq.rst and two simple questions to get the ball rolling
on having a gabbi faq in the docs.

This format probably won't scale in the long run, but is useful in
the short run and while the format might become lame the content
will not.
2016-08-17 12:42:34 +01:00
Jason Myers
92718ede93 Fixing link to google (#162)
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2016-08-08 13:55:32 +01:00
Chris Dent
b7612145e8 release 1.24.0
- allow regex in jsonpath string matches
2016-07-06 15:26:46 -04:00
Chris Dent
0767cb8c7c Allow regex in json path values (#160)
If the value of jsonpath entry is a string and is wrapped in /.../
then the matching of the results of the jsonpath will be check via
the regex.

Fixes #146
2016-07-06 15:13:35 -04:00
Chris Dent
a9039670e7 Merge branch 'master' into content-handlers 2016-07-03 12:33:39 -04:00
Chris Dent
eabee1f83d release 1.23.0
* better concurrency documentation
* correct pytest test counts and fixture running
2016-06-16 14:22:49 +01:00
Chris Dent
5d8949257a Be more visible about test loader needs when concurrent
Some recent failulres in OpenStack land made it clear that
it was less clear than it should be the precautions that are
required when running gabbi in a concurrent testing environment.
2016-06-16 13:38:56 +01:00
Chris Dent
c72d736a89 Merge branch 'master' into content-handlers 2016-06-16 11:43:08 +01:00
Chris Dent
1b9a0be830 Adjustments for release notes
* add a link to README.rst
* reverse chronological order of notes
2016-06-16 11:21:36 +01:00
Chris Dent
b69f36291a Add a release notes page to the docs. (#155)
The idea is to have informal (but hopefully useful) entries on
this page when something interesting happens. I've filled it in
with all the relevant releases since 1.0.0.
2016-06-15 19:29:16 +01:00
Chris Dent
011421df98 Tune up the docs so modules are presented better
On https://gabbi.readthedocs.io/ not all modules were present.
Notably missing was suitemaker, which is kind of the key to the
whole thing.
2016-06-15 18:19:16 +01:00
Chris Dent
f6fed93824 Tidy up after rebasing from master
Get tests working again, move some modules around for more
sensibility, fix links in documentation.
2016-06-08 16:50:16 +01:00
Chris Dent
32de38d487 Merge branch 'master' into content-handlers 2016-06-08 13:30:03 +01:00
Chris Dent
08cb8ac1bd Allowing forcing SSL in build_tests and gabbi-run
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.
2016-06-02 09:15:57 +01:00
Chris Dent
f6eb64fe05 Merge pull request #135 from cdent/cookie-substitution
Cookie substitution
2016-06-01 17:00:31 +01:00
Chris Dent
3d04e979c2 Get gabbi working with IPv6 addresses
According to rfc 2732 an IPv6 address in a url needs to be enclosed
in [] (e.g. http://[::1]/foobar). Gabbi was not doing this. Instead
it was passing host information directly to its URL generation
routine and just using it. When doing tests against real servers
running on ipv6, this results in failures.

The changes here try to do the bare minumum to get the right results
without changing the create_url method too much. It's likely that in
some future version of gabbi we will want to change a lot here (the
current orientation towards hosts and ports instead of URLs is the
result of the wsgi-intercept integration) but for now we want to
keep the change limited.

I hate myself for the mocks in test_runner. A clear sign of bad
abstraction in runner.py, however this is not the place to be
changing that. Another item for the later list.

Fixes #136
2016-06-01 13:35:26 +01:00
Chris Dent
1947ce952a Add a docs for $COOKIE
There's only a very small amount here. In part this is because
the feature is small but also because the use cases are not
super clear.
2016-05-31 16:55:53 +01:00
Chris Dent
0fe72b4a93 correct list in handerls docs 2016-05-06 20:20:37 +01:00
Chris Dent
3bcac9c9d8 Tweak the content-handler docs a little bit
Trying to get close to understandable.
2016-05-06 20:16:54 +01:00
Chris Dent
bb7e74eab9 Make sure the pytest generator knows about content_handlers
A simple matter of argument passing.
2016-05-06 18:27:22 +01:00
Chris Dent
ad431ea3d2 Merge branch 'master' into content-handlers 2016-05-06 17:04:48 +01:00
Chris Dent
08ee1d1edb Merge branch 'master' into content-handlers 2016-05-06 16:59:12 +01:00
Chris Dent
682c4b224e Tune up the docs for content-handlers a bit
Thanks to comments from @FND this now has a more useful structure
that orders and separate things by topic and complexity.

* introduce the general topic
* say how to use existing handlers
* explain how to create them

This is an improvement but I'm not certain it is yet perfect.
That's okay. If it is good enough we can move forward and move
it in the direction of perfect later.
2016-05-06 16:56:59 +01:00
Chris Dent
01aa81d42e Adjust the definition of LAST_URL
Instead of being the full url used in the last tast, LAST_URL
now means the URL defined in the last test, with substitutions
performed.

Just that.
2016-05-06 16:04:01 +01:00
Chris Dent
7987a89ff6 First pass at implementing $LAST_URL feature
If $LAST_URL is used anywhere a replacer is accepted, it will
be replaced with the URL from the previous test.

At the moment the URL is the full url that is passed into the http
client. Thus it includes the scheme, the netloc and any query
parameters that may have been added by the use of the
`query_parameters` test key.

It's not certain that this is the right choice. The other option is
to use the value of `url` that is in the test input. The is what's
actually the value of the url or {GET,POST,..} key in the test.
This is problematic though as there are at least two ways this could
be interpreted:

* the literal string that is in test['url'] in the test data
  structure
* that string after replacers have been run

Using the final full URL seems to suit the use cases I can think of
and feels somehow less ambiguous so that's what I implemented, but
it too has some issues:

* If $LAST_URL has query parameters in it, trying to _replace_ (not
  extend) those parametes via `query_parameters` doesn't really work.
  There's a failing test to demonstrate this problem.

(there may be others I haven't thought of yet)

Input desired from @FND and others please.
2016-05-06 00:40:06 +01:00
Chris Dent
d3351ec2e9 Update docs to points to readthedocs.io
Also add a YAML sample in README and front page of docs.
2016-04-29 12:34:53 +01:00
Chris Dent
1d0878cd9e Add documentation for ContentHandlers
In the process of writing, some slight adjustments to the interface
were made:

* ContentHandlers direcly inherit from ResponseHandler rather than
  doing a Mixin. This makes it easier to create your own.

* Rather than defining gen_replacer, a subclass defines replacer,
  which gen_replacer calls.

The documentation is challenging to get right. I suspect there are
many improvements that could be made to make it more informative
and easier to follow. I think I'm probalby too close to it. @FND
will likely have some useful suggestions.

Still todo: docstrings on the new classes.
2016-04-21 15:36:25 +01:00
Chris Dent
8f95bd5692 release 1.17.1
- fix pytest failure  handling
2016-04-16 10:46:01 +01:00
Chris Dent
03938351d7 Update pytest docs
To remove warning about missing functionality.
2016-04-16 03:01:21 +01:00
Chris Dent
d3b76d231c Make slight improvements to pytest related docs.
This is based on commentary from @FND. There's still plenty of
room for improvement but iteration is good.
2016-04-08 10:40:15 +01:00
Chris Dent
748eac9d8a Add docs about the pytest situation
This may not be fully adequate but is a reasonable start. The main
point was to indicate the different loader method and the need
to yield the generated tests.
2016-04-06 14:20:30 +01:00
Chris Dent
60719215b8 Support testing of full json responses
This feature was effectively already there but not fleshed out in
tests nor documentation. Now there are some tests and a short
piece of documentation with a light warning about avoiding overuse.

A slight adjustment was required in data handling to deal with
empty lists and empty objects.

Fixes #113
2016-03-16 17:32:59 +00:00
FND
26daaae3ef Fix JSON formatting in docs
to avoid controversial idiosyncrasies
2016-03-11 21:39:41 +01:00
FND
56081d354a Simplify and clarify JSONPath docs
seems more concise and easier to digest this way
2016-03-11 21:38:41 +01:00
FND
20be204512 Improve internal reference in docs 2016-03-11 21:09:11 +01:00
Chris Dent
26132c0fb5 Fix punctuation problem in jsonpath docs
Because everyone is their own worst editor.
2016-03-11 19:29:53 +00:00
Chris Dent
ded89e8b43 Adjust jsonpath documentation
To be more clear about the sort, len and filter features.
2016-03-11 19:24:36 +00:00
Chris Dent
088b4cd71f Add small amount of docs for json extensions
These could probably be better but need to use it a bit to clear
on how to document it.
2016-03-05 15:17:00 +00:00
FND
e73050f2b3 Fix typo 2016-02-18 16:33:24 +01:00
FND
ffedc8b1e4 Switch to mdash where appropriate
not asserting comprehensive coverage though
2016-02-18 16:32:46 +01:00