Skip to content

Commit

Permalink
fix TestGetSrvVSchemas authztestgen config and autogen files
Browse files Browse the repository at this point in the history
Signed-off-by: c-r-dev <[email protected]>
  • Loading branch information
c-r-dev committed Feb 6, 2025
1 parent d97901d commit c37692a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
31 changes: 31 additions & 0 deletions go/vt/vtadmin/api_authz_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion go/vt/vtadmin/testutil/authztestgen/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@
"type": "map[string]struct{\nResponse *vtctldatapb.GetSchemaResponse\nError error}",
"value": "\"zone1-0000000100\": {\nResponse: &vtctldatapb.GetSchemaResponse{\nSchema: &tabletmanagerdatapb.SchemaDefinition{\nTableDefinitions: []*tabletmanagerdatapb.TableDefinition{\n{Name: \"t1\", Schema: \"create table t1 (id int(11) not null primary key);\",},\n{Name: \"t2\"},\n},\n},\n},\n},"
},

{
"field": "GetSrvVSchemaResults",
"type": "map[string]struct{\nResponse *vtctldatapb.GetSrvVSchemaResponse\nError error}",
"value": "\"zone1\": {\nResponse: &vtctldatapb.GetSrvVSchemaResponse{\nSrvVSchema: &vschemapb.SrvVSchema{\nKeyspaces: map[string]*vschemapb.Keyspace{\n\"test\": {\nSharded: true,\nVindexes: map[string]*vschemapb.Vindex{\n\"id\": {\nType: \"hash\",\n},\n},\nTables: map[string]*vschemapb.Table{\n\"t1\": {\nColumnVindexes: []*vschemapb.ColumnVindex{\n{\nName: \"id\",\nColumn: \"id\",\n},\n},\n},\n},\n},\n},\n},\n},\n},",
"comment": "this structure exists primarily to support the VExplain test cases; for GetSrvVSchema(s) itself, an empty but non-nil map is sufficient"
},
{
"field": "GetVSchemaResults",
"type": "map[string]struct{\nResponse *vtctldatapb.GetVSchemaResponse\nError error}",
Expand Down

0 comments on commit c37692a

Please sign in to comment.