mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-15 13:57:09 +02:00
test(api): share API v1 test helpers and check scopes in Go
Move the end-to-end call/setup/mint helpers to a suite-level test client and the apiauth login/mustMint helpers to package level. Replace the hardcoded vacuum x-scope enum with a Go test that every known scope is a valid spec Scope; the gate already rejects unknown x-scope values.
This commit is contained in:
parent
c479c4f581
commit
45d8a7724d
8 changed files with 172 additions and 178 deletions
|
|
@ -44,14 +44,6 @@ rules:
|
|||
then:
|
||||
field: security
|
||||
function: defined
|
||||
nd-operation-x-scope:
|
||||
description: An operation's x-scope is a known scope. Cross-checks with x-module and security run in Go (server/apiv1 newGate).
|
||||
severity: error
|
||||
given: $.paths[*][get,put,post,delete,patch]['x-scope']
|
||||
then:
|
||||
function: enumeration
|
||||
functionOptions:
|
||||
values: [read, password]
|
||||
nd-operation-stability-level-required:
|
||||
description: Every operation declares its stability level, which the breaking-change gate relies on.
|
||||
severity: error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue