8 runCommand "${elasticmq-server.name}-tests"
13 client = boto3.resource(
15 endpoint_url="http://localhost:9324",
16 region_name="elasticmq",
17 aws_secret_access_key="x",
18 aws_access_key_id="x",
21 queue = client.get_queue_by_name(QueueName="foobar")
25 buildInputs = with python3Packages; [
29 emqConfig = writeText "emq-test.conf" ''
30 generate-node-address = true
36 putMessagePy = writeText "put_message.py" ''
38 queue.send_message(MessageBody="bazqux")
40 checkMessagePy = writeText "check_message.py" ''
42 messages = queue.receive_messages()
43 print(f"Received {messages!r}")
44 assert len(messages) == 1
45 assert messages[0].body == "bazqux"
50 JAVA_TOOL_OPTIONS="-Dconfig.file=$emqConfig" ${elasticmq-server}/bin/elasticmq-server &
55 python $checkMessagePy