Initial heat REST API tests with gabbi
Last summit we decided to add suite of gabbi tests
for REST API validation and then propose a subset of
these to tempest to be the defcore tests.
This adds the basic framework and few stack api tests
as a start.
Change-Id: I79a6fe971a97fdc4412616137ae963748cc349e5
diff --git a/api/gabbits/stacks.yaml b/api/gabbits/stacks.yaml
new file mode 100644
index 0000000..3028018
--- /dev/null
+++ b/api/gabbits/stacks.yaml
@@ -0,0 +1,47 @@
+defaults:
+ request_headers:
+ X-Auth-Token: $ENVIRON['OS_TOKEN']
+
+tests:
+- name: stack list
+ GET: /stacks
+ status: 200
+ response_headers:
+ content-type: application/json; charset=UTF-8
+
+- name: create empty stack
+ POST: /stacks
+ request_headers:
+ content-type: application/json
+ data:
+ files: {}
+ disable_rollback: true
+ parameters: {}
+ stack_name: $ENVIRON['PREFIX']-empty
+ environment: {}
+ template:
+ heat_template_version: '2016-04-08'
+
+ status: 201
+ response_headers:
+ location: //stacks/$ENVIRON['PREFIX']-empty/[a-f0-9-]+/
+
+
+- name: poll for empty CREATE_COMPLETE
+ GET: $LOCATION
+ redirects: True
+ poll:
+ count: 5
+ delay: 1.0
+ response_json_paths:
+ $.stack.stack_status: CREATE_COMPLETE
+
+- name: show empty stack
+ GET: $LAST_URL
+ redirects: True
+ status: 200
+
+- name: delete empty stack
+ DELETE: $LAST_URL
+ redirects: True
+ status: 204