mirror of
https://github.com/rancher/steve.git
synced 2025-09-16 07:18:28 +00:00
SQLite backed cache: Support sorting mgmt clusters on value in a specific condition (#447)
* Replace primary/secondary sort fields with an array of sort directives. * Allow more than 2 sort-params in a search query. * Add a virtual 'status.ready' field to clusters. * Rename status.ready -> status.connected * Set virtual field 'spec.internal' <- spec.displayName == 'local' * Need to declare all virtual fields to index. * Ready clusters have condition[type==Ready && status=True] * Update the README to reflect generalized sorting. * Bump lasso to get revised sort directives. * Review-driven changes, mostly comments and drop unneeded code. * Add unit tests to verify sort-order stringification. * Ignore empty-string sort components. * Fix a rebase mishap. * Drop unneeded commented-out code. * Clusters have a 'spec.internal' field, no need to synthesize one. * Added a note on square-brackets for label references. This should be added to the README for filter queries in the PR for 46333. * Bump to latest sqlcache-free lasso
This commit is contained in:
@@ -523,7 +523,7 @@ func TestList(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "sorting with missing primary sort is unsorted",
|
||||
name: "sorting with missing primary sort continues",
|
||||
apiOps: []*types.APIRequest{
|
||||
newRequest("sort=,metadata.name", "user1"),
|
||||
},
|
||||
@@ -553,8 +553,8 @@ func TestList(t *testing.T) {
|
||||
Count: 3,
|
||||
Objects: []types.APIObject{
|
||||
newApple("fuji").toObj(),
|
||||
newApple("honeycrisp").toObj(),
|
||||
newApple("granny-smith").toObj(),
|
||||
newApple("honeycrisp").toObj(),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user