mirror of
https://github.com/rancher/steve.git
synced 2025-09-13 13:59:40 +00:00
* Show patch link on the API resource when patch permission is present and add patch ResourceMethod to the schema.
This commit is contained in:
@@ -38,6 +38,15 @@ func TestSchemas(t *testing.T) {
|
||||
errDesired: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "basic patch schema test",
|
||||
config: schemaTestConfig{
|
||||
permissionVerbs: []string{"patch"},
|
||||
desiredResourceVerbs: []string{"PATCH"},
|
||||
desiredCollectionVerbs: []string{},
|
||||
errDesired: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
@@ -162,7 +171,7 @@ func makeSchema(resourceType string) *types.APISchema {
|
||||
"group": testGroup,
|
||||
"version": testVersion,
|
||||
"resource": resourceType,
|
||||
"verbs": []string{"get", "list", "watch", "delete", "update", "create"},
|
||||
"verbs": []string{"get", "list", "watch", "delete", "update", "create", "patch"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user