Skip to content

Commit

Permalink
fix: stable versions
Browse files Browse the repository at this point in the history
  • Loading branch information
vgorkavenko committed Aug 3, 2023
1 parent ff14fcf commit 3b3468c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM python:3.11-slim as base
FROM python:3.11.3-slim as base

RUN apt-get update && apt-get install -y --no-install-recommends -qq \
gcc=4:12.2.0-3 \
libffi-dev=3.4.4-1 \
g++=4:12.2.0-3 \
git=1:2.39.2-1.1 \
curl=7.88.1-10 \
gcc=4:10.2.1-1 \
libffi-dev=3.3-6 \
g++=4:10.2.1-1 \
git=1:2.30.2-1+deb11u2 \
curl=7.74.0-1.3+deb11u7 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
5 changes: 2 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def mock_slot_range(monkeypatch, slot_range_param):


@pytest.fixture
def watcher(mock_slot_range, caplog):
def watcher(mock_slot_range):
from src.watcher import Watcher # pylint: disable=import-outside-toplevel

web3 = Web3(
Expand All @@ -30,5 +30,4 @@ def watcher(mock_slot_range, caplog):
'lido_contracts': LidoContracts,
}
)
with caplog.at_level("INFO"):
yield Watcher([SlashingHandler(), ForkHandler(), ExitsHandler()], web3)
return Watcher([SlashingHandler(), ForkHandler(), ExitsHandler()], web3)
9 changes: 6 additions & 3 deletions tests/test_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def test_processing(watcher):


def test_slashings(caplog, watcher):
watcher.run()
with caplog.at_level("INFO"):
watcher.run()

for alert in slashing_alerts:
assert str(alert) in caplog.text, f"Alert {alert} should be in logs"
Expand Down Expand Up @@ -90,14 +91,16 @@ def test_slashings(caplog, watcher):

@pytest.mark.parametrize('slot_range_param', ["6897643-6897655"])
def test_unexpected_exits(caplog, watcher, slot_range_param):
watcher.run()
with caplog.at_level("INFO"):
watcher.run()

for alert in exit_alerts:
assert str(alert) in caplog.text, f"Alert {alert} should be in logs"


@pytest.mark.parametrize('slot_range_param', ["6833022-6833039"])
def test_expected_exits(caplog, watcher, slot_range_param):
watcher.run()
with caplog.at_level("INFO"):
watcher.run()

assert 'Lido validators were unexpected exited!' not in caplog.text, "Alert should not be in logs"

0 comments on commit 3b3468c

Please sign in to comment.