open-vault/builtin/credential/approle
Anton Averchenkov 6ae09f3074
Add AppRole response schema validation tests (#18636)
This PR modifies every test in `builtin/credentials/approle/path_role_test.go` with new validation checks to ensure that approle/path_role  successful responses align with the declared response schema.

It also introduces a test helper in `sdk/helper/testhelpers`:

```go
func FindResponseSchema(t *testing.T, ...)
```

This test helper will be useful for all plugins that require similar response schema validation in tests.

### Background

This PR is part of the ongoing work to add structured responses in Vault OpenAPI (VLT-234)
2023-01-13 15:23:36 -05:00
..
cmd/approle
backend.go Check if plugin version matches running version (#17182) 2022-09-21 12:25:04 -07:00
backend_test.go Return errInvalidCredentials when wrong credentials is provided for existent users (#17104) 2022-09-27 16:49:14 -07:00
path_login.go Return errInvalidCredentials when wrong credentials is provided for existent users (#17104) 2022-09-27 16:49:14 -07:00
path_login_test.go VAULT-6727 Adjust cert and approle role resolution, add more tests (#16341) 2022-07-20 09:24:06 -04:00
path_role.go Fix AppRole / path_role response schema (#18637) 2023-01-11 12:15:29 -05:00
path_role_test.go Add AppRole response schema validation tests (#18636) 2023-01-13 15:23:36 -05:00
path_tidy_user_id.go
path_tidy_user_id_test.go
validation.go Approle: Fix CIDR validation for /32 masks on Token Bound CIDRs (#18145) 2022-12-16 12:09:05 -05:00
validation_test.go