Add more gabbi REST API tests
Added REST API tests for environment, resource_type and
template api.
Change-Id: I708791d46faedeb736f0c1ed5e7936100569931c
diff --git a/api/gabbits/templates.yaml b/api/gabbits/templates.yaml
new file mode 100644
index 0000000..7b67054
--- /dev/null
+++ b/api/gabbits/templates.yaml
@@ -0,0 +1,37 @@
+defaults:
+ request_headers:
+ X-Auth-Token: $ENVIRON['OS_TOKEN']
+
+tests:
+- name: list template versions
+ GET: /template_versions
+ status: 200
+ response_json_paths:
+ $.template_versions[?(@.version='heat_template_version.2017-02-24')].type: hot
+
+- name: list template functions
+ GET: /template_versions/heat_template_version.2016-10-14/functions
+ status: 200
+ response_json_paths:
+ $.template_functions[?(@.functions='get_file')].description:
+ A function for including a file inline.
+
+- name: template validate
+ POST: /validate
+ request_headers:
+ content-type: application/json
+ data:
+ template:
+ heat_template_version: '2016-04-08'
+ parameters:
+ test_val:
+ type: string
+ resources:
+ test:
+ type: OS::Heat::TestResource
+ properties:
+ value: {get_param: test_val}
+ outputs:
+ output_value:
+ value: {get_attr: [test, output]}
+ status: 200