Repository: typesafehub/conductr-cli

Issue:
bndl endpoint should default to --path-beg

Discussion:

Patch:
diff --git a/conductr_cli/endpoint.py b/conductr_cli/endpoint.py
index b8048f5..4cf8d4c 100644
--- a/conductr_cli/endpoint.py
+++ b/conductr_cli/endpoint.py
@@ -112,7 +112,7 @@ class HttpRequest:
 
     def hocon(self):
         request_tree = ConfigTree()
-        request_tree.put(self.match if self.match else 'path', self.value)
+        request_tree.put(self.match if self.match else 'path-beg', self.value)
         if self.method:
             request_tree.put('method', self.method)
         if self.rewrite:


Test patch:
diff --git a/conductr_cli/test/test_bndl_utils.py b/conductr_cli/test/test_bndl_utils.py
index 70ab43c..72c200b 100644
--- a/conductr_cli/test/test_bndl_utils.py
+++ b/conductr_cli/test/test_bndl_utils.py
@@ -434,7 +434,7 @@ class TestBndlUtils(CliTestCase):
                |      http {
                |        requests = [
                |          {
-               |            path = "/"
+               |            path-beg = "/"
                |          }
                |        ]
                |      }