From 5230af0e0c106dd2665692427d8ae59ccba97f82 Mon Sep 17 00:00:00 2001 From: Raul Jordan Date: Wed, 15 Sep 2021 09:42:05 -0500 Subject: [PATCH] Move EndtoEnd Tests to Testing/ Folder (#9586) * endtoend to testing/ * gaz Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> --- beacon-chain/core/BUILD.bazel | 2 +- beacon-chain/core/helpers/BUILD.bazel | 2 +- beacon-chain/core/transition/BUILD.bazel | 2 +- beacon-chain/db/testing/BUILD.bazel | 2 +- beacon-chain/p2p/BUILD.bazel | 2 +- cmd/beacon-chain/BUILD.bazel | 2 +- cmd/beacon-chain/flags/BUILD.bazel | 2 +- cmd/slasher/BUILD.bazel | 2 +- cmd/validator/BUILD.bazel | 2 +- cmd/validator/flags/BUILD.bazel | 2 +- {endtoend => testing/endtoend}/BUILD.bazel | 10 +++++----- {endtoend => testing/endtoend}/README.md | 2 +- .../endtoend}/components/BUILD.bazel | 10 +++++----- .../endtoend}/components/beacon_node.go | 6 +++--- .../endtoend}/components/boot_node.go | 6 +++--- {endtoend => testing/endtoend}/components/eth1.go | 6 +++--- {endtoend => testing/endtoend}/components/log.go | 0 {endtoend => testing/endtoend}/components/slasher.go | 6 +++--- .../endtoend}/components/tracing_sink.go | 4 ++-- .../endtoend}/components/validator.go | 6 +++--- {endtoend => testing/endtoend}/endtoend_test.go | 10 +++++----- .../endtoend}/evaluators/BUILD.bazel | 12 ++++++------ .../endtoend}/evaluators/api_gateway_v1.go | 6 +++--- .../endtoend}/evaluators/api_gateway_v1alpha1.go | 6 +++--- {endtoend => testing/endtoend}/evaluators/data.go | 2 +- .../endtoend}/evaluators/finality.go | 4 ++-- {endtoend => testing/endtoend}/evaluators/fork.go | 4 ++-- {endtoend => testing/endtoend}/evaluators/metrics.go | 6 +++--- {endtoend => testing/endtoend}/evaluators/node.go | 6 +++--- .../endtoend}/evaluators/operations.go | 8 ++++---- .../endtoend}/evaluators/slashing.go | 4 ++-- .../endtoend}/evaluators/validator.go | 4 ++-- {endtoend => testing/endtoend}/geth_deps.go | 0 {endtoend => testing/endtoend}/helpers/BUILD.bazel | 8 ++++---- {endtoend => testing/endtoend}/helpers/epochTimer.go | 0 {endtoend => testing/endtoend}/helpers/helpers.go | 4 ++-- {endtoend => testing/endtoend}/minimal_e2e_test.go | 6 +++--- .../endtoend}/minimal_slashing_e2e_test.go | 6 +++--- {endtoend => testing/endtoend}/params/BUILD.bazel | 4 ++-- {endtoend => testing/endtoend}/params/params.go | 0 {endtoend => testing/endtoend}/policies/BUILD.bazel | 2 +- {endtoend => testing/endtoend}/policies/policies.go | 0 {endtoend => testing/endtoend}/types/BUILD.bazel | 4 ++-- {endtoend => testing/endtoend}/types/types.go | 0 44 files changed, 91 insertions(+), 91 deletions(-) rename {endtoend => testing/endtoend}/BUILD.bazel (81%) rename {endtoend => testing/endtoend}/README.md (94%) rename {endtoend => testing/endtoend}/components/BUILD.bazel (80%) rename {endtoend => testing/endtoend}/components/beacon_node.go (96%) rename {endtoend => testing/endtoend}/components/boot_node.go (93%) rename {endtoend => testing/endtoend}/components/eth1.go (96%) rename {endtoend => testing/endtoend}/components/log.go (100%) rename {endtoend => testing/endtoend}/components/slasher.go (94%) rename {endtoend => testing/endtoend}/components/tracing_sink.go (96%) rename {endtoend => testing/endtoend}/components/validator.go (98%) rename {endtoend => testing/endtoend}/endtoend_test.go (97%) rename {endtoend => testing/endtoend}/evaluators/BUILD.bazel (79%) rename {endtoend => testing/endtoend}/evaluators/api_gateway_v1.go (97%) rename {endtoend => testing/endtoend}/evaluators/api_gateway_v1alpha1.go (98%) rename {endtoend => testing/endtoend}/evaluators/data.go (95%) rename {endtoend => testing/endtoend}/evaluators/finality.go (93%) rename {endtoend => testing/endtoend}/evaluators/fork.go (94%) rename {endtoend => testing/endtoend}/evaluators/metrics.go (97%) rename {endtoend => testing/endtoend}/evaluators/node.go (96%) rename {endtoend => testing/endtoend}/evaluators/operations.go (98%) rename {endtoend => testing/endtoend}/evaluators/slashing.go (98%) rename {endtoend => testing/endtoend}/evaluators/validator.go (98%) rename {endtoend => testing/endtoend}/geth_deps.go (100%) rename {endtoend => testing/endtoend}/helpers/BUILD.bazel (69%) rename {endtoend => testing/endtoend}/helpers/epochTimer.go (100%) rename {endtoend => testing/endtoend}/helpers/helpers.go (98%) rename {endtoend => testing/endtoend}/minimal_e2e_test.go (92%) rename {endtoend => testing/endtoend}/minimal_slashing_e2e_test.go (80%) rename {endtoend => testing/endtoend}/params/BUILD.bazel (69%) rename {endtoend => testing/endtoend}/params/params.go (100%) rename {endtoend => testing/endtoend}/policies/BUILD.bazel (75%) rename {endtoend => testing/endtoend}/policies/policies.go (100%) rename {endtoend => testing/endtoend}/types/BUILD.bazel (68%) rename {endtoend => testing/endtoend}/types/types.go (100%) diff --git a/beacon-chain/core/BUILD.bazel b/beacon-chain/core/BUILD.bazel index 58ba46327..3f3a67abc 100644 --- a/beacon-chain/core/BUILD.bazel +++ b/beacon-chain/core/BUILD.bazel @@ -6,7 +6,6 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/beacon-chain/core", visibility = [ "//beacon-chain:__subpackages__", - "//endtoend/evaluators:__pkg__", "//fuzz:__pkg__", "//shared/attestationutil:__pkg__", "//shared/depositutil:__pkg__", @@ -17,6 +16,7 @@ go_library( "//shared/testutil/altair:__pkg__", "//slasher:__subpackages__", "//testing/benchmark/benchmark_files:__subpackages__", + "//testing/endtoend/evaluators:__pkg__", "//testing/spectest:__subpackages__", "//tools:__subpackages__", "//validator:__subpackages__", diff --git a/beacon-chain/core/helpers/BUILD.bazel b/beacon-chain/core/helpers/BUILD.bazel index 61567a1ca..dcf77de29 100644 --- a/beacon-chain/core/helpers/BUILD.bazel +++ b/beacon-chain/core/helpers/BUILD.bazel @@ -18,7 +18,6 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers", visibility = [ "//beacon-chain:__subpackages__", - "//endtoend/evaluators:__pkg__", "//fuzz:__pkg__", "//shared/attestationutil:__pkg__", "//shared/depositutil:__pkg__", @@ -29,6 +28,7 @@ go_library( "//shared/testutil/altair:__pkg__", "//slasher:__subpackages__", "//testing/benchmark/benchmark_files:__subpackages__", + "//testing/endtoend/evaluators:__pkg__", "//testing/spectest:__subpackages__", "//tools:__subpackages__", "//validator:__subpackages__", diff --git a/beacon-chain/core/transition/BUILD.bazel b/beacon-chain/core/transition/BUILD.bazel index 8b528f450..6a976c1da 100644 --- a/beacon-chain/core/transition/BUILD.bazel +++ b/beacon-chain/core/transition/BUILD.bazel @@ -15,10 +15,10 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/beacon-chain/core/transition", visibility = [ "//beacon-chain:__subpackages__", - "//endtoend:__pkg__", "//fuzz:__pkg__", "//shared/interop:__pkg__", "//shared/testutil:__pkg__", + "//testing/endtoend:__pkg__", "//testing/spectest:__subpackages__", "//tools/benchmark-files-gen:__pkg__", "//tools/genesis-state-gen:__pkg__", diff --git a/beacon-chain/db/testing/BUILD.bazel b/beacon-chain/db/testing/BUILD.bazel index a0be7ad8a..90bb0105b 100644 --- a/beacon-chain/db/testing/BUILD.bazel +++ b/beacon-chain/db/testing/BUILD.bazel @@ -7,7 +7,7 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/beacon-chain/db/testing", visibility = [ "//beacon-chain:__subpackages__", - "//endtoend:__subpackages__", + "//testing/endtoend:__subpackages__", ], deps = [ "//beacon-chain/db:go_default_library", diff --git a/beacon-chain/p2p/BUILD.bazel b/beacon-chain/p2p/BUILD.bazel index df4dde99c..9fb934784 100644 --- a/beacon-chain/p2p/BUILD.bazel +++ b/beacon-chain/p2p/BUILD.bazel @@ -35,8 +35,8 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/beacon-chain/p2p", visibility = [ "//beacon-chain:__subpackages__", - "//endtoend/evaluators:__pkg__", "//fuzz:__pkg__", + "//testing/endtoend/evaluators:__pkg__", "//tools:__subpackages__", ], deps = [ diff --git a/cmd/beacon-chain/BUILD.bazel b/cmd/beacon-chain/BUILD.bazel index 7a50e34bb..f9f3b9fee 100644 --- a/cmd/beacon-chain/BUILD.bazel +++ b/cmd/beacon-chain/BUILD.bazel @@ -132,7 +132,7 @@ go_binary( embed = [":go_default_library"], visibility = [ "//beacon-chain:__subpackages__", - "//endtoend:__pkg__", + "//testing/endtoend:__pkg__", ], ) diff --git a/cmd/beacon-chain/flags/BUILD.bazel b/cmd/beacon-chain/flags/BUILD.bazel index 420d2ab1a..c4f5d95a9 100644 --- a/cmd/beacon-chain/flags/BUILD.bazel +++ b/cmd/beacon-chain/flags/BUILD.bazel @@ -12,8 +12,8 @@ go_library( visibility = [ "//beacon-chain:__subpackages__", "//cmd/beacon-chain:__subpackages__", - "//endtoend:__subpackages__", "//shared/gateway:__pkg__", + "//testing/endtoend:__subpackages__", ], deps = [ "//shared/cmd:go_default_library", diff --git a/cmd/slasher/BUILD.bazel b/cmd/slasher/BUILD.bazel index abc9b3136..65a2b34c1 100644 --- a/cmd/slasher/BUILD.bazel +++ b/cmd/slasher/BUILD.bazel @@ -83,7 +83,7 @@ go_binary( name = "slasher", embed = [":go_default_library"], visibility = [ - "//endtoend:__pkg__", "//slasher:__subpackages__", + "//testing/endtoend:__pkg__", ], ) diff --git a/cmd/validator/BUILD.bazel b/cmd/validator/BUILD.bazel index 1a7ed6eea..a504f4ae8 100644 --- a/cmd/validator/BUILD.bazel +++ b/cmd/validator/BUILD.bazel @@ -133,7 +133,7 @@ go_binary( embed = [":go_default_library"], pure = "off", # Enabled unless there is a valid reason to include cgo dep. visibility = [ - "//endtoend:__pkg__", + "//testing/endtoend:__pkg__", "//validator:__subpackages__", ], ) diff --git a/cmd/validator/flags/BUILD.bazel b/cmd/validator/flags/BUILD.bazel index a98c5cbe8..832a59e64 100644 --- a/cmd/validator/flags/BUILD.bazel +++ b/cmd/validator/flags/BUILD.bazel @@ -9,7 +9,7 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/cmd/validator/flags", visibility = [ "//cmd/validator:__subpackages__", - "//endtoend:__subpackages__", + "//testing/endtoend:__subpackages__", "//validator:__subpackages__", ], deps = [ diff --git a/endtoend/BUILD.bazel b/testing/endtoend/BUILD.bazel similarity index 81% rename from endtoend/BUILD.bazel rename to testing/endtoend/BUILD.bazel index 6f2042ea4..8ad4d89a4 100644 --- a/endtoend/BUILD.bazel +++ b/testing/endtoend/BUILD.bazel @@ -30,15 +30,15 @@ go_test( ], deps = [ "//beacon-chain/core/transition:go_default_library", - "//endtoend/components:go_default_library", - "//endtoend/evaluators:go_default_library", - "//endtoend/helpers:go_default_library", - "//endtoend/params:go_default_library", - "//endtoend/types:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", + "//testing/endtoend/components:go_default_library", + "//testing/endtoend/evaluators:go_default_library", + "//testing/endtoend/helpers:go_default_library", + "//testing/endtoend/params:go_default_library", + "//testing/endtoend/types:go_default_library", "@com_github_prysmaticlabs_eth2_types//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@org_golang_google_grpc//:go_default_library", diff --git a/endtoend/README.md b/testing/endtoend/README.md similarity index 94% rename from endtoend/README.md rename to testing/endtoend/README.md index 892525000..df92fef8e 100644 --- a/endtoend/README.md +++ b/testing/endtoend/README.md @@ -21,5 +21,5 @@ Evaluators have 3 parts, the name for it's test name, a `policy` which declares If you wish to run all the minimal spec E2E tests, you can run them through bazel with: ``` -bazel test //endtoend:go_default_test --define=ssz=minimal --test_output=streamed +bazel test //testing/endtoend:go_default_test --define=ssz=minimal --test_output=streamed ``` diff --git a/endtoend/components/BUILD.bazel b/testing/endtoend/components/BUILD.bazel similarity index 80% rename from endtoend/components/BUILD.bazel rename to testing/endtoend/components/BUILD.bazel index de895e676..00e0a83d1 100644 --- a/endtoend/components/BUILD.bazel +++ b/testing/endtoend/components/BUILD.bazel @@ -12,20 +12,20 @@ go_library( "tracing_sink.go", "validator.go", ], - importpath = "github.com/prysmaticlabs/prysm/endtoend/components", - visibility = ["//endtoend:__subpackages__"], + importpath = "github.com/prysmaticlabs/prysm/testing/endtoend/components", + visibility = ["//testing/endtoend:__subpackages__"], deps = [ "//cmd/beacon-chain/flags:go_default_library", "//cmd/validator/flags:go_default_library", "//config/features:go_default_library", "//contracts/deposit-contract:go_default_library", - "//endtoend/helpers:go_default_library", - "//endtoend/params:go_default_library", - "//endtoend/types:go_default_library", "//shared/bytesutil:go_default_library", "//shared/cmd:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", + "//testing/endtoend/helpers:go_default_library", + "//testing/endtoend/params:go_default_library", + "//testing/endtoend/types:go_default_library", "@com_github_ethereum_go_ethereum//accounts/abi/bind:go_default_library", "@com_github_ethereum_go_ethereum//accounts/keystore:go_default_library", "@com_github_ethereum_go_ethereum//core/types:go_default_library", diff --git a/endtoend/components/beacon_node.go b/testing/endtoend/components/beacon_node.go similarity index 96% rename from endtoend/components/beacon_node.go rename to testing/endtoend/components/beacon_node.go index e8404d54b..8e0e52025 100644 --- a/endtoend/components/beacon_node.go +++ b/testing/endtoend/components/beacon_node.go @@ -14,11 +14,11 @@ import ( "github.com/bazelbuild/rules_go/go/tools/bazel" "github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags" "github.com/prysmaticlabs/prysm/config/features" - "github.com/prysmaticlabs/prysm/endtoend/helpers" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" cmdshared "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/helpers" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" ) var _ e2etypes.ComponentRunner = (*BeaconNode)(nil) diff --git a/endtoend/components/boot_node.go b/testing/endtoend/components/boot_node.go similarity index 93% rename from endtoend/components/boot_node.go rename to testing/endtoend/components/boot_node.go index 47e6382cc..9846e0d0f 100644 --- a/endtoend/components/boot_node.go +++ b/testing/endtoend/components/boot_node.go @@ -9,9 +9,9 @@ import ( "strings" "github.com/bazelbuild/rules_go/go/tools/bazel" - "github.com/prysmaticlabs/prysm/endtoend/helpers" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" + "github.com/prysmaticlabs/prysm/testing/endtoend/helpers" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" ) var _ e2etypes.ComponentRunner = (*BootNode)(nil) diff --git a/endtoend/components/eth1.go b/testing/endtoend/components/eth1.go similarity index 96% rename from endtoend/components/eth1.go rename to testing/endtoend/components/eth1.go index 3d4de78d5..9e78a7732 100644 --- a/endtoend/components/eth1.go +++ b/testing/endtoend/components/eth1.go @@ -20,10 +20,10 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/rpc" contracts "github.com/prysmaticlabs/prysm/contracts/deposit-contract" - "github.com/prysmaticlabs/prysm/endtoend/helpers" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" "github.com/prysmaticlabs/prysm/shared/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/helpers" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" ) const timeGapPerTX = 100 * time.Millisecond diff --git a/endtoend/components/log.go b/testing/endtoend/components/log.go similarity index 100% rename from endtoend/components/log.go rename to testing/endtoend/components/log.go diff --git a/endtoend/components/slasher.go b/testing/endtoend/components/slasher.go similarity index 94% rename from endtoend/components/slasher.go rename to testing/endtoend/components/slasher.go index 7ddce5001..e06c167fa 100644 --- a/endtoend/components/slasher.go +++ b/testing/endtoend/components/slasher.go @@ -8,9 +8,9 @@ import ( "strings" "github.com/bazelbuild/rules_go/go/tools/bazel" - "github.com/prysmaticlabs/prysm/endtoend/helpers" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" + "github.com/prysmaticlabs/prysm/testing/endtoend/helpers" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" ) var _ e2etypes.ComponentRunner = (*SlasherNode)(nil) diff --git a/endtoend/components/tracing_sink.go b/testing/endtoend/components/tracing_sink.go similarity index 96% rename from endtoend/components/tracing_sink.go rename to testing/endtoend/components/tracing_sink.go index 892c1450f..28af56d17 100644 --- a/endtoend/components/tracing_sink.go +++ b/testing/endtoend/components/tracing_sink.go @@ -10,8 +10,8 @@ import ( "os/signal" "syscall" - "github.com/prysmaticlabs/prysm/endtoend/helpers" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/helpers" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" ) // TracingSink to capture HTTP requests from opentracing pushes. This is meant diff --git a/endtoend/components/validator.go b/testing/endtoend/components/validator.go similarity index 98% rename from endtoend/components/validator.go rename to testing/endtoend/components/validator.go index a3905a914..cae222be6 100644 --- a/endtoend/components/validator.go +++ b/testing/endtoend/components/validator.go @@ -20,13 +20,13 @@ import ( "github.com/prysmaticlabs/prysm/cmd/validator/flags" "github.com/prysmaticlabs/prysm/config/features" contracts "github.com/prysmaticlabs/prysm/contracts/deposit-contract" - "github.com/prysmaticlabs/prysm/endtoend/helpers" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" "github.com/prysmaticlabs/prysm/shared/bytesutil" cmdshared "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" + "github.com/prysmaticlabs/prysm/testing/endtoend/helpers" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" ) const depositGasLimit = 4000000 diff --git a/endtoend/endtoend_test.go b/testing/endtoend/endtoend_test.go similarity index 97% rename from endtoend/endtoend_test.go rename to testing/endtoend/endtoend_test.go index 6b0411650..5cb91af57 100644 --- a/endtoend/endtoend_test.go +++ b/testing/endtoend/endtoend_test.go @@ -17,15 +17,15 @@ import ( types "github.com/prysmaticlabs/eth2-types" "github.com/prysmaticlabs/prysm/beacon-chain/core/transition" - "github.com/prysmaticlabs/prysm/endtoend/components" - ev "github.com/prysmaticlabs/prysm/endtoend/evaluators" - "github.com/prysmaticlabs/prysm/endtoend/helpers" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" + "github.com/prysmaticlabs/prysm/testing/endtoend/components" + ev "github.com/prysmaticlabs/prysm/testing/endtoend/evaluators" + "github.com/prysmaticlabs/prysm/testing/endtoend/helpers" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" log "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" "google.golang.org/grpc" diff --git a/endtoend/evaluators/BUILD.bazel b/testing/endtoend/evaluators/BUILD.bazel similarity index 79% rename from endtoend/evaluators/BUILD.bazel rename to testing/endtoend/evaluators/BUILD.bazel index cd43e9626..c552aa4db 100644 --- a/endtoend/evaluators/BUILD.bazel +++ b/testing/endtoend/evaluators/BUILD.bazel @@ -15,16 +15,12 @@ go_library( "slashing.go", "validator.go", ], - importpath = "github.com/prysmaticlabs/prysm/endtoend/evaluators", - visibility = ["//endtoend:__subpackages__"], + importpath = "github.com/prysmaticlabs/prysm/testing/endtoend/evaluators", + visibility = ["//testing/endtoend:__subpackages__"], deps = [ "//beacon-chain/core:go_default_library", "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/p2p:go_default_library", - "//endtoend/helpers:go_default_library", - "//endtoend/params:go_default_library", - "//endtoend/policies:go_default_library", - "//endtoend/types:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/block:go_default_library", "//proto/prysm/v1alpha1/wrapper:go_default_library", @@ -33,6 +29,10 @@ go_library( "//shared/params:go_default_library", "//shared/sliceutil:go_default_library", "//shared/testutil:go_default_library", + "//testing/endtoend/helpers:go_default_library", + "//testing/endtoend/params:go_default_library", + "//testing/endtoend/policies:go_default_library", + "//testing/endtoend/types:go_default_library", "//time/slots:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_prysmaticlabs_eth2_types//:go_default_library", diff --git a/endtoend/evaluators/api_gateway_v1.go b/testing/endtoend/evaluators/api_gateway_v1.go similarity index 97% rename from endtoend/evaluators/api_gateway_v1.go rename to testing/endtoend/evaluators/api_gateway_v1.go index 86072155f..b0ed00763 100644 --- a/endtoend/evaluators/api_gateway_v1.go +++ b/testing/endtoend/evaluators/api_gateway_v1.go @@ -8,9 +8,9 @@ import ( "time" "github.com/pkg/errors" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - "github.com/prysmaticlabs/prysm/endtoend/policies" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/policies" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" "google.golang.org/grpc" ) diff --git a/endtoend/evaluators/api_gateway_v1alpha1.go b/testing/endtoend/evaluators/api_gateway_v1alpha1.go similarity index 98% rename from endtoend/evaluators/api_gateway_v1alpha1.go rename to testing/endtoend/evaluators/api_gateway_v1alpha1.go index 8d914d620..3ab7ebce8 100644 --- a/endtoend/evaluators/api_gateway_v1alpha1.go +++ b/testing/endtoend/evaluators/api_gateway_v1alpha1.go @@ -8,10 +8,10 @@ import ( "net/http" "github.com/golang/protobuf/ptypes/empty" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - "github.com/prysmaticlabs/prysm/endtoend/policies" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/policies" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" "google.golang.org/grpc" ) diff --git a/endtoend/evaluators/data.go b/testing/endtoend/evaluators/data.go similarity index 95% rename from endtoend/evaluators/data.go rename to testing/endtoend/evaluators/data.go index d69d2cb11..113204c12 100644 --- a/endtoend/evaluators/data.go +++ b/testing/endtoend/evaluators/data.go @@ -5,8 +5,8 @@ import ( "errors" types "github.com/prysmaticlabs/eth2-types" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" "google.golang.org/grpc" ) diff --git a/endtoend/evaluators/finality.go b/testing/endtoend/evaluators/finality.go similarity index 93% rename from endtoend/evaluators/finality.go rename to testing/endtoend/evaluators/finality.go index 4f365c4d7..26264df68 100644 --- a/endtoend/evaluators/finality.go +++ b/testing/endtoend/evaluators/finality.go @@ -5,9 +5,9 @@ import ( "fmt" "github.com/pkg/errors" - "github.com/prysmaticlabs/prysm/endtoend/policies" - "github.com/prysmaticlabs/prysm/endtoend/types" eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/testing/endtoend/policies" + "github.com/prysmaticlabs/prysm/testing/endtoend/types" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/endtoend/evaluators/fork.go b/testing/endtoend/evaluators/fork.go similarity index 94% rename from endtoend/evaluators/fork.go rename to testing/endtoend/evaluators/fork.go index a3b87cdfd..ae90eeb2f 100644 --- a/endtoend/evaluators/fork.go +++ b/testing/endtoend/evaluators/fork.go @@ -5,11 +5,11 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/beacon-chain/core" - "github.com/prysmaticlabs/prysm/endtoend/policies" - "github.com/prysmaticlabs/prysm/endtoend/types" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" wrapperv2 "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" "github.com/prysmaticlabs/prysm/shared/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/policies" + "github.com/prysmaticlabs/prysm/testing/endtoend/types" "google.golang.org/grpc" ) diff --git a/endtoend/evaluators/metrics.go b/testing/endtoend/evaluators/metrics.go similarity index 97% rename from endtoend/evaluators/metrics.go rename to testing/endtoend/evaluators/metrics.go index 35850614a..95dedb30f 100644 --- a/endtoend/evaluators/metrics.go +++ b/testing/endtoend/evaluators/metrics.go @@ -12,11 +12,11 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/beacon-chain/p2p" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - "github.com/prysmaticlabs/prysm/endtoend/policies" - "github.com/prysmaticlabs/prysm/endtoend/types" eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/shared/p2putils" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/policies" + "github.com/prysmaticlabs/prysm/testing/endtoend/types" "github.com/prysmaticlabs/prysm/time/slots" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/emptypb" diff --git a/endtoend/evaluators/node.go b/testing/endtoend/evaluators/node.go similarity index 96% rename from endtoend/evaluators/node.go rename to testing/endtoend/evaluators/node.go index cae3a9d64..ec5668e37 100644 --- a/endtoend/evaluators/node.go +++ b/testing/endtoend/evaluators/node.go @@ -12,10 +12,10 @@ import ( "github.com/pkg/errors" types "github.com/prysmaticlabs/eth2-types" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - "github.com/prysmaticlabs/prysm/endtoend/policies" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/policies" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/endtoend/evaluators/operations.go b/testing/endtoend/evaluators/operations.go similarity index 98% rename from endtoend/evaluators/operations.go rename to testing/endtoend/evaluators/operations.go index 167235e06..422284d26 100644 --- a/endtoend/evaluators/operations.go +++ b/testing/endtoend/evaluators/operations.go @@ -9,16 +9,16 @@ import ( "github.com/pkg/errors" types "github.com/prysmaticlabs/eth2-types" corehelpers "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" - "github.com/prysmaticlabs/prysm/endtoend/helpers" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - "github.com/prysmaticlabs/prysm/endtoend/policies" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" + "github.com/prysmaticlabs/prysm/testing/endtoend/helpers" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/policies" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" "golang.org/x/exp/rand" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/emptypb" diff --git a/endtoend/evaluators/slashing.go b/testing/endtoend/evaluators/slashing.go similarity index 98% rename from endtoend/evaluators/slashing.go rename to testing/endtoend/evaluators/slashing.go index af5bc5f79..02ec3fa57 100644 --- a/endtoend/evaluators/slashing.go +++ b/testing/endtoend/evaluators/slashing.go @@ -8,13 +8,13 @@ import ( types "github.com/prysmaticlabs/eth2-types" "github.com/prysmaticlabs/go-bitfield" corehelpers "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" - "github.com/prysmaticlabs/prysm/endtoend/policies" - e2eTypes "github.com/prysmaticlabs/prysm/endtoend/types" eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/sliceutil" "github.com/prysmaticlabs/prysm/shared/testutil" + "github.com/prysmaticlabs/prysm/testing/endtoend/policies" + e2eTypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/endtoend/evaluators/validator.go b/testing/endtoend/evaluators/validator.go similarity index 98% rename from endtoend/evaluators/validator.go rename to testing/endtoend/evaluators/validator.go index 394816e1d..60f782947 100644 --- a/endtoend/evaluators/validator.go +++ b/testing/endtoend/evaluators/validator.go @@ -6,10 +6,10 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/beacon-chain/core" - "github.com/prysmaticlabs/prysm/endtoend/policies" - "github.com/prysmaticlabs/prysm/endtoend/types" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/policies" + "github.com/prysmaticlabs/prysm/testing/endtoend/types" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/endtoend/geth_deps.go b/testing/endtoend/geth_deps.go similarity index 100% rename from endtoend/geth_deps.go rename to testing/endtoend/geth_deps.go diff --git a/endtoend/helpers/BUILD.bazel b/testing/endtoend/helpers/BUILD.bazel similarity index 69% rename from endtoend/helpers/BUILD.bazel rename to testing/endtoend/helpers/BUILD.bazel index 7476ced02..44295f8ea 100644 --- a/endtoend/helpers/BUILD.bazel +++ b/testing/endtoend/helpers/BUILD.bazel @@ -7,13 +7,13 @@ go_library( "epochTimer.go", "helpers.go", ], - importpath = "github.com/prysmaticlabs/prysm/endtoend/helpers", - visibility = ["//endtoend:__subpackages__"], + importpath = "github.com/prysmaticlabs/prysm/testing/endtoend/helpers", + visibility = ["//testing/endtoend:__subpackages__"], deps = [ - "//endtoend/params:go_default_library", - "//endtoend/types:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//shared/params:go_default_library", + "//testing/endtoend/params:go_default_library", + "//testing/endtoend/types:go_default_library", "//time:go_default_library", "//time/slots:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", diff --git a/endtoend/helpers/epochTimer.go b/testing/endtoend/helpers/epochTimer.go similarity index 100% rename from endtoend/helpers/epochTimer.go rename to testing/endtoend/helpers/epochTimer.go diff --git a/endtoend/helpers/helpers.go b/testing/endtoend/helpers/helpers.go similarity index 98% rename from endtoend/helpers/helpers.go rename to testing/endtoend/helpers/helpers.go index df27f1025..933a5c61e 100644 --- a/endtoend/helpers/helpers.go +++ b/testing/endtoend/helpers/helpers.go @@ -16,10 +16,10 @@ import ( "testing" "time" - e2e "github.com/prysmaticlabs/prysm/endtoend/params" - e2etypes "github.com/prysmaticlabs/prysm/endtoend/types" eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" + e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" + e2etypes "github.com/prysmaticlabs/prysm/testing/endtoend/types" "github.com/prysmaticlabs/prysm/time/slots" log "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" diff --git a/endtoend/minimal_e2e_test.go b/testing/endtoend/minimal_e2e_test.go similarity index 92% rename from endtoend/minimal_e2e_test.go rename to testing/endtoend/minimal_e2e_test.go index 7c32876ab..ecacef51d 100644 --- a/endtoend/minimal_e2e_test.go +++ b/testing/endtoend/minimal_e2e_test.go @@ -6,11 +6,11 @@ import ( "strconv" "testing" - ev "github.com/prysmaticlabs/prysm/endtoend/evaluators" - e2eParams "github.com/prysmaticlabs/prysm/endtoend/params" - "github.com/prysmaticlabs/prysm/endtoend/types" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil/require" + ev "github.com/prysmaticlabs/prysm/testing/endtoend/evaluators" + e2eParams "github.com/prysmaticlabs/prysm/testing/endtoend/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/types" ) func TestEndToEnd_MinimalConfig(t *testing.T) { diff --git a/endtoend/minimal_slashing_e2e_test.go b/testing/endtoend/minimal_slashing_e2e_test.go similarity index 80% rename from endtoend/minimal_slashing_e2e_test.go rename to testing/endtoend/minimal_slashing_e2e_test.go index 3c76d252a..87e34c889 100644 --- a/endtoend/minimal_slashing_e2e_test.go +++ b/testing/endtoend/minimal_slashing_e2e_test.go @@ -3,11 +3,11 @@ package endtoend import ( "testing" - ev "github.com/prysmaticlabs/prysm/endtoend/evaluators" - e2eParams "github.com/prysmaticlabs/prysm/endtoend/params" - "github.com/prysmaticlabs/prysm/endtoend/types" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil/require" + ev "github.com/prysmaticlabs/prysm/testing/endtoend/evaluators" + e2eParams "github.com/prysmaticlabs/prysm/testing/endtoend/params" + "github.com/prysmaticlabs/prysm/testing/endtoend/types" ) func TestEndToEnd_Slashing_MinimalConfig(t *testing.T) { diff --git a/endtoend/params/BUILD.bazel b/testing/endtoend/params/BUILD.bazel similarity index 69% rename from endtoend/params/BUILD.bazel rename to testing/endtoend/params/BUILD.bazel index 65ac5ef74..ad3fa1239 100644 --- a/endtoend/params/BUILD.bazel +++ b/testing/endtoend/params/BUILD.bazel @@ -4,8 +4,8 @@ go_library( name = "go_default_library", testonly = True, srcs = ["params.go"], - importpath = "github.com/prysmaticlabs/prysm/endtoend/params", - visibility = ["//endtoend:__subpackages__"], + importpath = "github.com/prysmaticlabs/prysm/testing/endtoend/params", + visibility = ["//testing/endtoend:__subpackages__"], deps = [ "@com_github_ethereum_go_ethereum//common:go_default_library", "@io_bazel_rules_go//go/tools/bazel:go_default_library", diff --git a/endtoend/params/params.go b/testing/endtoend/params/params.go similarity index 100% rename from endtoend/params/params.go rename to testing/endtoend/params/params.go diff --git a/endtoend/policies/BUILD.bazel b/testing/endtoend/policies/BUILD.bazel similarity index 75% rename from endtoend/policies/BUILD.bazel rename to testing/endtoend/policies/BUILD.bazel index 31d92bd6f..69cf47110 100644 --- a/endtoend/policies/BUILD.bazel +++ b/testing/endtoend/policies/BUILD.bazel @@ -3,7 +3,7 @@ load("@prysm//tools/go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["policies.go"], - importpath = "github.com/prysmaticlabs/prysm/endtoend/policies", + importpath = "github.com/prysmaticlabs/prysm/testing/endtoend/policies", visibility = ["//visibility:public"], deps = ["@com_github_prysmaticlabs_eth2_types//:go_default_library"], ) diff --git a/endtoend/policies/policies.go b/testing/endtoend/policies/policies.go similarity index 100% rename from endtoend/policies/policies.go rename to testing/endtoend/policies/policies.go diff --git a/endtoend/types/BUILD.bazel b/testing/endtoend/types/BUILD.bazel similarity index 68% rename from endtoend/types/BUILD.bazel rename to testing/endtoend/types/BUILD.bazel index a27b6425f..d72ff2dc9 100644 --- a/endtoend/types/BUILD.bazel +++ b/testing/endtoend/types/BUILD.bazel @@ -4,8 +4,8 @@ go_library( name = "go_default_library", testonly = True, srcs = ["types.go"], - importpath = "github.com/prysmaticlabs/prysm/endtoend/types", - visibility = ["//endtoend:__subpackages__"], + importpath = "github.com/prysmaticlabs/prysm/testing/endtoend/types", + visibility = ["//testing/endtoend:__subpackages__"], deps = [ "@com_github_prysmaticlabs_eth2_types//:go_default_library", "@org_golang_google_grpc//:go_default_library", diff --git a/endtoend/types/types.go b/testing/endtoend/types/types.go similarity index 100% rename from endtoend/types/types.go rename to testing/endtoend/types/types.go