From 549cd4f21f3c60072c65a597e857498f46a5bee7 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Tue, 20 Apr 2021 09:23:28 -0600 Subject: [PATCH] api: include ent fuzzy struct types in oss Small change to pull in ent struct types in a switch statement used by ent. They are benign in oss, this is just to make sure OSS->ENT merges don't create a diff. --- api/search_test.go | 1 + nomad/search_endpoint.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/search_test.go b/api/search_test.go index 0b24e6c30..62f0bd4a5 100644 --- a/api/search_test.go +++ b/api/search_test.go @@ -31,6 +31,7 @@ func TestSearch_PrefixSearch(t *testing.T) { func TestSearch_FuzzySearch(t *testing.T) { t.Parallel() + c, s := makeClient(t, nil, nil) defer s.Stop() diff --git a/nomad/search_endpoint.go b/nomad/search_endpoint.go index 098a846a3..8c4bd25ea 100644 --- a/nomad/search_endpoint.go +++ b/nomad/search_endpoint.go @@ -652,7 +652,7 @@ func (s *Search) FuzzySearch(args *structs.FuzzySearchRequest, reply *structs.Fu for _, ctx := range prefixContexts { switch ctx { // only apply on the types that use UUID prefix searching - case structs.Evals, structs.Deployments, structs.ScalingPolicies, structs.Volumes: + case structs.Evals, structs.Deployments, structs.ScalingPolicies, structs.Volumes, structs.Quotas, structs.Recommendations: iter, err := getResourceIter(ctx, aclObj, namespace, roundUUIDDownIfOdd(args.Prefix, args.Context), ws, state) if err != nil { if !s.silenceError(err) { @@ -668,7 +668,7 @@ func (s *Search) FuzzySearch(args *structs.FuzzySearchRequest, reply *structs.Fu for _, ctx := range fuzzyContexts { switch ctx { // skip the types that use UUID prefix searching - case structs.Evals, structs.Deployments, structs.ScalingPolicies, structs.Volumes: + case structs.Evals, structs.Deployments, structs.ScalingPolicies, structs.Volumes, structs.Quotas, structs.Recommendations: continue default: iter, err := getFuzzyResourceIterator(ctx, aclObj, namespace, ws, state)