diff --git a/tests/pydnstest/scenario.py b/tests/pydnstest/scenario.py index b6e8cca5a8d77f9522f3eb648d2d93b083252a33..fac362f40616ee1f338c5f674b3a0e390409b7b9 100644 --- a/tests/pydnstest/scenario.py +++ b/tests/pydnstest/scenario.py @@ -299,8 +299,6 @@ class Step: msg = self.data[0].message msg.use_edns(edns = 1) data_to_wire = msg.to_wire() -# self.raw_answer = ctx.resolve(data_to_wire) -# ctx.last_raw_answer = self.raw_answer ctx.sockudp4.sendto(data_to_wire,(peeraddr,53)) ctx.sockudp4.settimeout(10) if self.data[0].is_raw_data_entry is True: diff --git a/tests/test_integration.py b/tests/test_integration.py index 62ededf94b645160139d2ca6823e0ec38a03f325..807c5f06d87c0a11e97f8506eb1fb01b153f729a 100755 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -45,7 +45,6 @@ if "SOCKET_WRAPPER_DIR" in os.environ: if TMPDIR == "" or os.path.isdir(TMPDIR) is False: OLDTMPDIR = TMPDIR TMPDIR = tempfile.mkdtemp(suffix='', prefix='tmp') -# os.chmod(TMPDIR,stat.S_IRUSR|stat.S_IWUSR|stat.S_IXUSR|stat.S_IRGRP|stat.S_IWGRP|stat.S_IXGRP|stat.S_IROTH|stat.S_IWOTH|stat.S_IXOTH) os.environ["SOCKET_WRAPPER_DIR"] = TMPDIR if TEST_DEBUG > 0: testserver.syn_print(None,"SOCKET_WRAPPER_DIR is invalid or empty ({}), set to default ({})".format(OLDTMPDIR, TMPDIR)) @@ -53,13 +52,6 @@ if TEST_DEBUG > 0: testserver.syn_print(None,"default_iface: {}, child_iface: {}, tmpdir {}".format(DEFAULT_IFACE, CHILD_IFACE, TMPDIR)) del_files(TMPDIR) -# Set up libfaketime -os.environ["FAKETIME_NO_CACHE"] = "1" -os.environ["FAKETIME_TIMESTAMP_FILE"] = '%s/.time' % TMPDIR -time_file = open(os.environ["FAKETIME_TIMESTAMP_FILE"], 'w') -time_file.write(datetime.fromtimestamp(0).strftime('%Y-%m-%d %H:%M:%S')) -time_file.close() - def get_next(file_in): """ Return next token from the input stream. """ while True: @@ -185,6 +177,13 @@ def play_object(path): finally: file_in.close() + # Set up libfaketime + os.environ["FAKETIME_NO_CACHE"] = "1" + os.environ["FAKETIME_TIMESTAMP_FILE"] = '%s/.time' % TMPDIR + time_file = open(os.environ["FAKETIME_TIMESTAMP_FILE"], 'w') + time_file.write(datetime.fromtimestamp(0).strftime('%Y-%m-%d %H:%M:%S')) + time_file.close() + child_env = os.environ.copy() child_env["SOCKET_WRAPPER_DEFAULT_IFACE"] = "%i" % CHILD_IFACE child_env["SOCKET_WRAPPER_DIR"] = TMPDIR