Repository: reecetech/pactman (language: python)

Issue:
Allow recursive globing of --pact-files for verifier
I'd like to verify pacts stored as local jsons. Suppose I have a directory structured like:

pacts
|------a
            |----pact_a.json
|------b
            |----pact_b.json
            
I'd like to run the pact-verifier with a single `--pact-files pacts/**/*.json` expression and get both pact_a.json and pact_b.json.


Discussion / hints:

Fix patch:
diff --git a/README.md b/README.md
index b7e5989..00341e0 100644
--- a/README.md
+++ b/README.md
@@ -540,7 +540,7 @@ requires a bearer token you may provide it with `--pact-broker-token=<TOKEN>` or
 environment variable.
 
 `--pact-files=<file pattern>` verifies some on-disk pact JSON files identified by the wildcard pattern
-(unix glob pattern matching).
+(unix glob pattern matching, use `**` to match multiple directories).
 
 If you pulled the pacts from a broker and wish to publish verification results, use `--pact-publish-results`
 to turn on publishing the results. This option also requires you to specify `--pact-provider-version=<version>`.


Test patch:
diff --git a/pactman/verifier/pytest_plugin.py b/pactman/verifier/pytest_plugin.py
index e24b184..bdbd2f8 100644
--- a/pactman/verifier/pytest_plugin.py
+++ b/pactman/verifier/pytest_plugin.py
@@ -119,7 +119,7 @@ def flatten_pacts(pacts):
 def get_pact_files(file_location):
     if not file_location:
         return []
-    for filename in glob.glob(file_location):
+    for filename in glob.glob(file_location, recursive=True):
         yield BrokerPact.load_file(filename, result_factory=PytestResult)