basestructure
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user