mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix: Handle invalid resource types and actions (#4341)
* fix: Handle invalid resource types and actions * Return all values if invalid * Use types
This commit is contained in:
@ -112,6 +112,21 @@ func TestAuditLogsFilter(t *testing.T) {
|
||||
SearchQuery: "resource_id:" + userResourceID.String(),
|
||||
ExpectedResult: 2,
|
||||
},
|
||||
{
|
||||
Name: "FilterInvalidSingleValue",
|
||||
SearchQuery: "invalid",
|
||||
ExpectedResult: 3,
|
||||
},
|
||||
{
|
||||
Name: "FilterWithInvalidResourceType",
|
||||
SearchQuery: "resource_type:invalid",
|
||||
ExpectedResult: 3,
|
||||
},
|
||||
{
|
||||
Name: "FilterWithInvalidAction",
|
||||
SearchQuery: "action:invalid",
|
||||
ExpectedResult: 3,
|
||||
},
|
||||
}
|
||||
|
||||
for _, testCase := range testCases {
|
||||
|
Reference in New Issue
Block a user