Merged in feature/remove-query (pull request #201)

remove query from codebase part 1

* remove query

* fix localstack run
This commit is contained in:
Jay Brown
2026-01-14 17:59:04 +00:00
parent ebf47c6013
commit 0ddae4f91e
167 changed files with 1059 additions and 20641 deletions
+3 -36
View File
@@ -14,12 +14,13 @@ import (
queryapi "queryorchestration/pkg/queryAPI"
"github.com/google/uuid"
"github.com/oapi-codegen/runtime/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
// Note: Query-related helper functions have been removed.
// See remove_query_plan.md for details.
type File struct {
ClientID queryapi.ClientID
Filename string
@@ -69,22 +70,6 @@ func CreateClientWithSync(t testing.TB, client queryapi.ClientWithResponsesInter
return clientCreateRes.JSON201.Id
}
func SetQueryForClient(t testing.TB, client queryapi.ClientWithResponsesInterface, clientId queryapi.ClientID, queryId uuid.UUID) {
t.Helper()
newActiveVersion := int32(1)
_, err := client.SetCollectorByClientIdWithResponse(t.Context(), clientId, queryapi.CollectorSet{
ActiveVersion: &newActiveVersion,
Fields: &[]queryapi.CollectorField{
{
Name: "JSON_QUERY",
QueryId: queryId,
},
},
})
require.NoError(t, err)
}
func WaitForClientStatus(t testing.TB, ctx context.Context, service queryapi.ClientWithResponsesInterface, id string, status queryapi.ClientStatus) {
t.Helper()
@@ -125,21 +110,3 @@ func WaitForClientStatus(t testing.TB, ctx context.Context, service queryapi.Cli
}
}
}
func CreateDependentQueries(t testing.TB, client *queryapi.ClientWithResponses) (uuid.UUID, uuid.UUID) {
contextQueryRes, err := client.CreateQueryWithResponse(t.Context(), queryapi.QueryCreate{
Type: queryapi.CONTEXTFULL,
})
require.NoError(t, err)
test.AssertStatus(t, http.StatusCreated, contextQueryRes.HTTPResponse)
jcfg := `{"path":"keyone"}`
jsonQueryRes, err := client.CreateQueryWithResponse(t.Context(), queryapi.QueryCreate{
Type: queryapi.JSONEXTRACTOR,
Config: &jcfg,
RequiredQueries: &[]types.UUID{contextQueryRes.JSON201.Id},
})
require.NoError(t, err)
test.AssertStatus(t, http.StatusCreated, jsonQueryRes.HTTPResponse)
return contextQueryRes.JSON201.Id, jsonQueryRes.JSON201.Id
}