tevern¶
https://taverntesting.github.io/
auth_keystone.yaml¶
---
name: keystone_auth_params
description: Keystone auth parametars
variables:
keystone:
username: admin
password: password
tenant: tenant_01
auth_url: https://localhost:5000/keystone/v3/auth/tokens
api_endpoint: https://localhost:8080/api/v1.0
stages:
- id: get_token
name: Get Unscoped token
request:
url: "{keystone.auth_url:s}"
method: POST
json:
auth:
scope:
project:
name: "{keystone.tenant:s}"
domain:
name: default
identity:
methods: ["password"]
password:
user:
domain:
name: default
name: "{keystone.username:s}"
password: "{keystone.password:s}"
headers:
content-type: "application/json"
response:
status_code: 201
save:
headers:
x_subject_token: '"X-Subject-Token"'
test_network.tavern.yaml¶
---
test_name: List networks
includes:
- !include auth.yaml
stages:
- type: ref
id: get_token
- name: List networks
request:
url: "{api_endpoint:s}/networks"
method: GET
headers:
content-type: "application/json"
X-Auth-Token: "{x_subject_token:s}"
response:
status_code: 200
最終更新日: 2021-06-06 09:29:57