TestSchemaForMessage_ScalarOnly walks a request that's purely scalars (no nested message). Profile takes no arguments at all; Session takes a few list-of-string + nested PermissionInput.
(t *testing.T)
| 64 | // (no nested message). Profile takes no arguments at all; Session takes |
| 65 | // a few list-of-string + nested PermissionInput. |
| 66 | func TestSchemaForMessage_AllScalarKinds(t *testing.T) { |
| 67 | md := (&authorizerv1.ValidateJwtTokenRequest{}).ProtoReflect().Descriptor() |
| 68 | s := schemaForMessage(md) |
| 69 | assert.Equal(t, "string", s.Properties["token_type"].Type) |
| 70 | assert.Equal(t, "string", s.Properties["token"].Type) |
| 71 | assert.Equal(t, "array", s.Properties["roles"].Type) |
| 72 | } |
| 73 | |
| 74 | // TestSchemaForMessage_CheckPermissionsNesting proves the generator handles |
| 75 | // the two-level nesting introduced by the OpenFGA dual-API: |
nothing calls this directly
no test coverage detected