Integrate pre-commit
Just as we've done for Nova and many other projects. Change-Id: I40410f637fcb1b05724a4ed7106e557c07006164 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
728abf5647
commit
cfdaf9836a
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.6.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: mixed-line-ending
|
||||
args: ['--fix', 'lf']
|
||||
exclude: '.*\.(svg)$'
|
||||
- id: check-byte-order-marker
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-merge-conflict
|
||||
- id: debug-statements
|
||||
- id: check-json
|
||||
files: .*\.json$
|
||||
- id: check-yaml
|
||||
files: .*\.(yaml|yml)$
|
||||
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||
rev: v1.5.5
|
||||
hooks:
|
||||
- id: remove-tabs
|
||||
exclude: '.*\.(svg)$'
|
||||
- repo: https://opendev.org/openstack/hacking
|
||||
rev: 6.1.0
|
||||
hooks:
|
||||
- id: hacking
|
||||
additional_dependencies: []
|
||||
exclude: '^(doc|releasenotes|tools)/.*$'
|
||||
# TODO(stephenfin): Uncomment this
|
||||
# - repo: https://github.com/sphinx-contrib/sphinx-lint
|
||||
# rev: v0.9.1
|
||||
# hooks:
|
||||
# - id: sphinx-lint
|
||||
# args: [--enable=default-role]
|
||||
# files: ^doc/|releasenotes|api-guide
|
||||
# types: [rst]
|
|
@ -107,7 +107,6 @@ tests:
|
|||
status: 200
|
||||
response_json_paths:
|
||||
$.allocation_requests.`len`: 2
|
||||
status: 200
|
||||
|
||||
- name: verify microversion fail for multiple member_of params
|
||||
GET: /allocation_candidates?resources=VCPU:1,MEMORY_MB:1024,DISK_GB:100&member_of=$ENVIRON['AGGA_UUID']&member_of=$ENVIRON['AGGB_UUID']
|
||||
|
|
|
@ -32,10 +32,6 @@ tests:
|
|||
status: 406
|
||||
response_headers:
|
||||
content-type: /application/json/
|
||||
response_json_paths:
|
||||
$.errors.[0].title: Not Acceptable
|
||||
$.errors.[0].max_version: /^\d+\.\d+$/
|
||||
$.errors.[0].min_version: /^\d+\.\d+$/
|
||||
response_strings:
|
||||
- "Unacceptable version header: 0.5"
|
||||
response_json_paths:
|
||||
|
|
Loading…
Reference in New Issue