Add BeaconChainHarness tests for The Merge (#2661)

* Start adding merge tests

* Expose MockExecutionLayer

* Add mock_execution_layer to BeaconChainHarness

* Progress with merge test

* Return more detailed errors with gas limit issues

* Use a better gas limit in block gen

* Ensure TTD is met in block gen

* Fix basic_merge tests

* Start geth testing

* Fix conflicts after rebase

* Remove geth tests

* Improve merge test

* Address clippy lints

* Make pow block gen a pure function

* Add working new test, breaking existing test

* Fix test names

* Add should_panic

* Don't run merge tests in debug

* Detect a tokio runtime when starting MockServer

* Fix clippy lint, include merge tests
This commit is contained in:
Paul Hauner
2021-10-02 11:39:11 +10:00
parent 801f6f7425
commit a1033a9247
14 changed files with 642 additions and 249 deletions

View File

@@ -519,7 +519,7 @@ mod test {
F: Future<Output = ()>,
{
request_func(self.echo_client.clone()).await;
let request_bytes = self.server.last_echo_request().await;
let request_bytes = self.server.last_echo_request();
let request_json: serde_json::Value =
serde_json::from_slice(&request_bytes).expect("request was not valid json");
if request_json != expected_json {
@@ -542,7 +542,7 @@ mod test {
F: Future<Output = ()>,
{
for response in preloaded_responses {
self.server.push_preloaded_response(response).await;
self.server.push_preloaded_response(response);
}
request_func(self.rpc_client.clone()).await;
self