Skip to content

Commit

Permalink
organize helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
ramin committed Jan 15, 2024
1 parent 4da5a3c commit 4125c72
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
api_tests:
name: Run api Integration Tests
name: API
runs-on: ubuntu-latest

steps:
Expand All @@ -25,7 +25,7 @@ jobs:
run: make test-integration TAGS=api

blob_tests:
name: Run blob Integration Tests
name: Blob
runs-on: ubuntu-latest

steps:
Expand All @@ -40,7 +40,7 @@ jobs:
run: make test-integration TAGS=blob

fraud_tests:
name: Run fraud Integration Tests
name: Fraud
runs-on: ubuntu-latest

steps:
Expand All @@ -55,7 +55,7 @@ jobs:
run: make test-integration TAGS=fraud

nd_tests:
name: Run nd Integration Tests
name: ND
runs-on: ubuntu-latest

steps:
Expand All @@ -70,7 +70,7 @@ jobs:
run: make test-integration TAGS=nd

p2p_tests:
name: Run p2p Integration Tests
name: p2p
runs-on: ubuntu-latest

steps:
Expand All @@ -85,7 +85,7 @@ jobs:
run: make test-integration TAGS=p2p

reconstruction_tests:
name: Run Reconstruction Integration Tests
name: Reconstruction
runs-on: ubuntu-latest

steps:
Expand All @@ -100,7 +100,7 @@ jobs:
run: make test-integration TAGS=reconstruction

sync_tests:
name: Run Sync Integration Tests
name: Sync
runs-on: ubuntu-latest

steps:
Expand Down
4 changes: 4 additions & 0 deletions nodebuilder/tests/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ import (
"github.com/celestiaorg/celestia-node/nodebuilder/tests/swamp"
)

const (
btime = time.Millisecond * 300
)

func TestNodeModule(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), swamp.DefaultTestTimeout)
t.Cleanup(cancel)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
//nolint:unused
package tests

import (
"context"
"testing"
"time"

"github.com/celestiaorg/celestia-node/api/rpc/client"
"github.com/celestiaorg/celestia-node/libs/authtoken"
Expand All @@ -12,7 +14,6 @@ import (
"github.com/stretchr/testify/require"
)

//nolint:unused
func getAdminClient(ctx context.Context, nd *nodebuilder.Node, t *testing.T) *client.Client {
t.Helper()

Expand All @@ -27,3 +28,8 @@ func getAdminClient(ctx context.Context, nd *nodebuilder.Node, t *testing.T) *cl

return client
}

func setTimeInterval(cfg *nodebuilder.Config, interval time.Duration) {
cfg.P2P.RoutingTableRefreshPeriod = interval
cfg.Share.Discovery.AdvertiseInterval = interval
}
5 changes: 0 additions & 5 deletions nodebuilder/tests/p2p_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,3 @@ func TestRestartNodeDiscovery(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, connectedness, network.Connected)
}

func setTimeInterval(cfg *nodebuilder.Config, interval time.Duration) {
cfg.P2P.RoutingTableRefreshPeriod = interval
cfg.Share.Discovery.AdvertiseInterval = interval
}

0 comments on commit 4125c72

Please sign in to comment.