diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 5fa4d66..56dd2de 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -44,9 +44,9 @@ jobs: run: | make test - - name: Run Optimism Test + - name: Run E2E Tests run: | - make optimism-test + make e2e-test gosec: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 6f3aead..bede22a 100644 --- a/Makefile +++ b/Makefile @@ -27,13 +27,13 @@ clean: rm bin/eigenda-proxy test: - go test -v ./... -parallel 4 + go test -v $(go list ./... | grep -v e2e) -parallel 4 -optimism-test: - OPTIMISM=true go test -timeout 1m -v ./e2e -deploy-config ../.devnet/devnetL1.json +e2e-test: + go test -timeout 1m -v ./e2e -parallel 4 -deploy-config ../.devnet/devnetL1.json holesky-test: - TESTNET=true go test -timeout 50m -v ./e2e -parallel 4 + TESTNET=true go test -timeout 50m -v ./e2e -parallel 4 -deploy-config ../.devnet/devnetL1.json .PHONY: lint lint: diff --git a/e2e/main_test.go b/e2e/main_test.go index 4507f72..a8dd26f 100644 --- a/e2e/main_test.go +++ b/e2e/main_test.go @@ -6,17 +6,16 @@ import ( ) var ( - runOptimismIntegrationTests bool - runTestnetIntegrationTests bool + runTestnetIntegrationTests bool ) func ParseEnv() { - runOptimismIntegrationTests = os.Getenv("OPTIMISM") == "true" || os.Getenv("OPTIMISM") == "1" runTestnetIntegrationTests = os.Getenv("TESTNET") == "true" || os.Getenv("TESTNET") == "1" } func TestMain(m *testing.M) { ParseEnv() + println("runTestnetIntegrationTests:", runTestnetIntegrationTests) code := m.Run() os.Exit(code) } diff --git a/e2e/optimism_test.go b/e2e/optimism_test.go index 6ac7461..f2d144a 100644 --- a/e2e/optimism_test.go +++ b/e2e/optimism_test.go @@ -106,9 +106,6 @@ func (a *L2PlasmaDA) ActL1Finalized(t actions.Testing) { } func TestOptimism(gt *testing.T) { - if !runOptimismIntegrationTests { - gt.Skip("Skipping OP Stack integration test") - } proxyTS, close := e2e.CreateTestSuite(gt, true) defer close() diff --git a/e2e/server_test.go b/e2e/server_test.go index 2bf4344..3547a1b 100644 --- a/e2e/server_test.go +++ b/e2e/server_test.go @@ -16,24 +16,12 @@ import ( ) func useMemory() bool { - if runOptimismIntegrationTests { - return true - } - - if runTestnetIntegrationTests { - return false - } - - return true + return !runTestnetIntegrationTests } func TestPlasmaClient(t *testing.T) { t.Parallel() - if runOptimismIntegrationTests { - t.Skip("Skipping testnet integration test") - } - ts, kill := e2e.CreateTestSuite(t, useMemory()) defer kill() @@ -60,10 +48,6 @@ func TestPlasmaClient(t *testing.T) { func TestProxyClient(t *testing.T) { t.Parallel() - if runOptimismIntegrationTests { - t.Skip("Skipping testnet integration test") - } - ts, kill := e2e.CreateTestSuite(t, useMemory()) defer kill()