Skip to content

Commit

Permalink
tests:go: harden
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamilcuk committed Jul 29, 2024
1 parent 13ce32e commit 84cb173
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/integration/test_go.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
from tests.testlib import run_nomadt

# These tests fail randomly because Nomad is too slow to transfer logs.
# Proper synchronization is somewhere between "can't be done" and TODO.
sync = "echo;echo;echo;echo;echo;echo;sleep 5"


def test_go_hello_world():
run_nomadt(
"go --rm busybox:stable sh -c 'echo hello world'",
f"go --rm busybox:stable sh -c 'echo hello world;{sync}'",
output=["hello world"],
)


def test_go_hello_world_md5():
run_nomadt(
"go --rm busybox:stable sh -c 'echo hello world | md5sum'",
f"go --rm busybox:stable sh -c 'echo hello world | md5sum;{sync}'",
output=["6f5902ac237024bdd0c176cb93063dc4"],
)

Expand Down

0 comments on commit 84cb173

Please sign in to comment.