Skip to content

Commit e6ae0b0

Browse files
committed
Validate geth version in test fixture against binary used for tests
1 parent 635b542 commit e6ae0b0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/integration/go_ethereum/conftest.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,17 @@ def get_geth_version(geth_binary):
7575
get_geth_version,
7676
)
7777

78-
return get_geth_version(geth_executable=os.path.expanduser(geth_binary))
78+
geth_version = get_geth_version(geth_executable=os.path.expanduser(geth_binary))
79+
80+
fixture_geth_version = GETH_FIXTURE_ZIP.split("-")[1]
81+
if fixture_geth_version not in str(geth_version):
82+
raise AssertionError(
83+
f"geth fixture version `{fixture_geth_version}` does not match geth "
84+
f"version for binary being used to run the test suite: `{geth_version}`. "
85+
"For CI runs, make sure to update the geth version in the CI config file."
86+
)
87+
88+
return geth_version
7989

8090

8191
@pytest.fixture(scope="module")

0 commit comments

Comments
 (0)