diff options
author | Peter Lemenkov <lemenkov@redhat.com> | 2017-04-12 12:40:39 +0200 |
---|---|---|
committer | Peter Lemenkov <lemenkov@redhat.com> | 2017-04-12 15:20:28 +0200 |
commit | f4d0613e53b0df0a0b5de1838a0c7d84ca7565da (patch) | |
tree | 160e4577b931c686f766f243c6e369b6f3a8415a /test/sd_notify_test.erl | |
parent | e3c98ad422c7097dd2601f2d096315ffad889412 (diff) | |
download | erlang-sd_notify-f4d0613e53b0df0a0b5de1838a0c7d84ca7565da.tar.gz |
Move test message creation to where it belongs
Signed-off-by: Peter Lemenkov <lemenkov@redhat.com>
Diffstat (limited to 'test/sd_notify_test.erl')
-rw-r--r-- | test/sd_notify_test.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sd_notify_test.erl b/test/sd_notify_test.erl index 32a8ac6..414f1bc 100644 --- a/test/sd_notify_test.erl +++ b/test/sd_notify_test.erl @@ -9,7 +9,6 @@ sd_notify_test_() -> sd_notify_test_local("19") -> {ok, CWD} = file:get_cwd(), FakeNotifyUnixSockName = CWD ++ "/fake-notify-udp-sock-" ++ integer_to_list(erlang:phash2(make_ref())), - TestMessage = integer_to_list(erlang:phash2(make_ref())), {ok, FakeNotifyUnixSock} = gen_udp:open(0, [{ifaddr, {local, FakeNotifyUnixSockName}}, {active, false}, list]), os:putenv("NOTIFY_SOCKET", FakeNotifyUnixSockName), @@ -20,6 +19,7 @@ sd_notify_test_local("19") -> { "Try sending message", fun() -> + TestMessage = integer_to_list(erlang:phash2(make_ref())), sd_notify:sd_pid_notify_with_fds(0, 0, TestMessage, [1, 2, 3]), {ok, {_Address, _Port, Packet}} = gen_udp:recv(FakeNotifyUnixSock, length(TestMessage), 1000), ?assertEqual(TestMessage, Packet) |