Skip to content

Commit

Permalink
Validate geth version in test fixture against binary used for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fselmo committed Jan 18, 2024
1 parent b61670b commit fd177c8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/integration/go_ethereum/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,17 @@ def get_geth_version(geth_binary):
get_geth_version,
)

return get_geth_version(geth_executable=os.path.expanduser(geth_binary))
geth_version = get_geth_version(geth_executable=os.path.expanduser(geth_binary))

fixture_geth_version = GETH_FIXTURE_ZIP.split("-")[1]
if fixture_geth_version not in str(geth_version):
raise AssertionError(
f"geth fixture version `{fixture_geth_version}` does not match geth "
f"version for binary being used to run the test suite: `{geth_version}`. "
"For CI runs, make sure to update the geth version in the CI config file."
)

return geth_version


@pytest.fixture(scope="module")
Expand Down

0 comments on commit fd177c8

Please sign in to comment.