Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/refactor: extend EthRPC framework class and use it in gentest.py #561

Open
danceratopz opened this issue May 17, 2024 · 1 comment · May be fixed by #568
Open

feat/refactor: extend EthRPC framework class and use it in gentest.py #561

danceratopz opened this issue May 17, 2024 · 1 comment · May be fixed by #568
Labels
good first issue Good for newcomers scope:fw Scope: Framework (evm|tools|forks|pytest) type:feat type: Feature type:refactor Type: Refactor

Comments

@danceratopz
Copy link
Member

#556 added classes to help calling ETH and Engine API methods on clients, we should extend these classes and refactor gentest.py to use them:

def _make_request(self, data) -> requests.Response:
error_str = "An error occurred while making remote request: "
try:
response = requests.post(self.node_url, headers=self.headers, data=json.dumps(data))
if response.status_code >= 200 and response.status_code < 300:
return response
else:
print(error_str + response.text, file=stderr)
raise requests.exceptions.HTTPError
except requests.exceptions.RequestException as e:
print(error_str, e, file=stderr)
raise e

@danceratopz danceratopz added good first issue Good for newcomers type:refactor Type: Refactor type:feat type: Feature scope:fw Scope: Framework (evm|tools|forks|pytest) labels May 17, 2024
@murluki
Copy link

murluki commented May 18, 2024

could you please assign this to me?

artemd24 pushed a commit to artemd24/execution-spec-tests that referenced this issue May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers scope:fw Scope: Framework (evm|tools|forks|pytest) type:feat type: Feature type:refactor Type: Refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants