basestructure

This commit is contained in:
Michael McGuinness
2025-01-07 16:12:18 +00:00
parent e09a75c216
commit d6fd74ac2d
7 changed files with 92 additions and 18 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert"
)
func TestName(t *testing.T) {
func TestQueryRunner(t *testing.T) {
ctx := context.Background()
queue, cleanup := createQueueDependencies(t, ctx, "queryrunner")
+27 -6
View File
@@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
)
func TestQuery(t *testing.T) {
func TestQueryService(t *testing.T) {
ctx := context.Background()
conn, cleanup := createAPIDependencies(t, ctx, "queryservice")
@@ -16,11 +16,32 @@ func TestQuery(t *testing.T) {
client := serviceinterfaces.NewQueryServiceClient(conn)
id := "sample_id"
_, err := client.Get(ctx, &serviceinterfaces.IdMessage{
Id: id,
config := ""
reqQueries := []string{}
idRes, err := client.Create(ctx, &serviceinterfaces.QueryCreate{
Type: 1,
Config: &config,
RequiredQueries: reqQueries,
})
assert.Nil(t, err)
id := idRes.GetId()
assert.NotEmpty(t, id)
// queryRes, err := client.Get(ctx, &serviceinterfaces.IdMessage{
// Id: id,
// })
// log.Print(err)
// assert.Nil(t, err)
// assert.EqualExportedValues(t, serviceinterfaces.Query{
// Id: id,
// Type: serviceinterfaces.QueryType_QUERY_TYPE_CONTEXT_FULL,
// ActiveVersion: int32(1),
// LatestVersion: int32(1),
// Config: &config,
// RequiredQueries: reqQueries,
// }, *queryRes)
//QueryService - List, Update, Test
//JobController - Create, Update, Get
//Export - Trigger
}