File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1- FROM greenbone/vulnerability-tests AS nasl
1+ FROM registry.community. greenbone.net/community /vulnerability-tests AS nasl
22# use latest version
33RUN mv `ls -d /var/lib/openvas/* | sort -r | head -n 1`/vt-data/nasl /nasl
44
@@ -7,7 +7,7 @@ COPY --chmod=7777 smoketest /usr/local/src
77WORKDIR /usr/local/src
88RUN make build-cmds
99
10- FROM greenbone/ openvas-scanner:unstable
10+ FROM registry.community. greenbone.net/community/ openvas-scanner:edge
1111
1212RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
1313 mosquitto \
Original file line number Diff line number Diff line change 33#
44# SPDX-License-Identifier: AGPL-3.0-or-later
55
6+ import time
67from datetime import datetime
78from uuid import UUID
89
@@ -87,12 +88,15 @@ def test_connect(self):
8788 daemon = MQTTDaemon (client )
8889
8990 def test_run (self ):
90- client = mock .MagicMock ()
91-
91+ client = mock .MagicMock (side_effect = 1 )
9292 daemon = MQTTDaemon (client )
93+ t_ini = time .time ()
9394
9495 daemon .run ()
96+ # In some systems the spawn of the thread can take longer than expected.
97+ # Therefore, we wait until the thread is spawned or times out.
98+ while len (client .mock_calls ) == 0 and time .time () - t_ini < 10 :
99+ time .sleep (1 )
95100
96101 client .connect .assert_called_with ()
97-
98102 client .loop_start .assert_called_with ()
You can’t perform that action at this time.
0 commit comments