storj/testsuite/storjscan/storjscantest/run_test.go
Yaroslav Vorobiov 53db7a897f testsuite/storjscan: add testsuite to test storjscan integration
Create Run function which spins up storjscan, eth test network and
testplanet configured with storjscan endpoint and credentials.

Change-Id: I5bafd07b6b2e4f39228faf76af7dd7135bed5f77
2022-08-05 16:49:22 +00:00

34 lines
863 B
Go

// Copyright (C) 2022 Storj Labs, Inc.
// See LICENSE for copying information.
package storjscantest_test
import (
"testing"
"github.com/stretchr/testify/require"
"storj.io/common/testcontext"
"storj.io/storj/private/testplanet"
"storj.io/storj/testsuite/storjscan/storjscantest"
"storj.io/storjscan/blockchain"
)
func TestRun(t *testing.T) {
storjscantest.Run(t, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet, stack *storjscantest.Stack) {
client := stack.Network.Dial()
block, err := client.BlockNumber(ctx)
require.NoError(t, err)
require.EqualValues(t, 1, block)
err = stack.App.API.Server.LogRoutes()
require.NoError(t, err)
pmnts, err := stack.App.Tokens.Service.Payments(ctx, blockchain.Address{}, 0)
require.NoError(t, err)
require.Len(t, pmnts, 0)
// TODO: add satellite whoami test call
})
}