Skip to content

Commit 5071780

Browse files
committed
Fix tests failing due to expiration date passed
We can't login once expiration date is reached, so bump it to 2030-01-01
1 parent e1eb9c1 commit 5071780

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

images/debian_bookworm/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ RUN echo "user:foo" | chpasswd
5858
RUN echo "*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\n-A PREROUTING -d 192.168.0.1/32 -j REDIRECT\nCOMMIT\n*filter\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT\nCOMMIT" > /etc/iptables/rules.v4
5959

6060
# Expiration date for user "user"
61-
RUN chage -E 20000 -m 7 -M 90 user
61+
RUN chage -E 2030-01-01 -m 7 -M 90 user
6262

6363
# Some python3 virtualenv
6464
RUN virtualenv /v

test/test_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def test_user_user(host):
246246

247247
def test_user_expiration_date(host):
248248
assert host.user("root").expiration_date is None
249-
assert host.user("user").expiration_date == (datetime.datetime(2024, 10, 4, 0, 0))
249+
assert host.user("user").expiration_date == datetime.datetime(2030, 1, 1)
250250

251251

252252
def test_nonexistent_user(host):

0 commit comments

Comments
 (0)