Skip to content

Commit

Permalink
Added make integration-test command.
Browse files Browse the repository at this point in the history
  • Loading branch information
vvuwei committed Mar 27, 2023
1 parent b6c177a commit e471d50
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ lint:
test:
go test ./...

integration-test:
docker compose up -d
until </dev/tcp/localhost/22000; do sleep 10; done
cd cmd/mempool && INTEGRATION=true HASURA_HOST=127.0.0.1 HASURA_PORT=22000 bash -c 'go test -v -timeout=15s -run TestIntegration_HasuraMetadata' || true
docker compose down

mempool:
cd cmd/mempool && go run . -c ../../build/dipdup.testnet.yml

Expand Down
6 changes: 5 additions & 1 deletion cmd/mempool/hasura_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ package main

import (
"github.com/dipdup-net/go-lib/hasura"
"os"
"testing"
)

func TestIntegration_HasuraMetadata(t *testing.T) {
// read config
if os.Getenv("INTEGRATION") == "" {
t.Skip("Skipping testing in CI environment")
}

configPath := "../../build/dipdup.testnet.yml" // todo: Fix paths
expectedMetadataPath := "../../build/expected_metadata.yml" // todo: Fix paths

Expand Down

0 comments on commit e471d50

Please sign in to comment.