From 3af8b3103483d8f542475b824fce57e28d58e242 Mon Sep 17 00:00:00 2001 From: Seb35 Date: Sun, 18 Dec 2022 19:56:04 +0100 Subject: [PATCH 1/3] Fix two failing tests By the way, converted the timeout parameter to a float. --- check_expire | 3 ++- tests.yaml | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/check_expire b/check_expire index 8e1ab29..329304e 100755 --- a/check_expire +++ b/check_expire @@ -101,7 +101,7 @@ try: elif option == "--hostname" or option == "-H": domain = value elif option == "--timeout" or option == "-t": - timeout = int(value) + timeout = float(value) elif option == "--unixtime" or option == "-u": unixtime = True elif option == "--verbose" or option == "-v": @@ -142,6 +142,7 @@ for server in servers: response = requests.get("%s/domain/%s" % (server, domain), timeout=timeout) except requests.exceptions.Timeout: unknowns += "Timeout when trying to reach %s " % server + continue if response.status_code != 200: errors += "Invalid RDAP return code at %s: %s " % \ (server, response.status_code) diff --git a/tests.yaml b/tests.yaml index 4ea49c1..597b22b 100644 --- a/tests.yaml +++ b/tests.yaml @@ -28,11 +28,11 @@ tests: retcode: 1 partstderr: 'ValueError' - # 2021-07-05: no RDAP server for this TLD + # No RDAP server for this TLD - exe: './check_expire' args: - '-H' - - 'bie.re' + - 'welcome.this-is-not-a-tld' retcode: 3 partstdout: 'No RDAP server' @@ -45,13 +45,13 @@ tests: retcode: 2 partstdout: 'No expiration found' - # Far away and slow, timeout is expected + # With a timeout of 1µs, a timeout is expected - exe: './check_expire' args: - '-t' - - '1' + - '0.000001' - '-H' - - 'nic.ar' + - 'bortzmeyer.org' retcode: 3 partstdout: 'Timeout' From 6d6f054a26a84709245111f2063c360e185da824 Mon Sep 17 00:00:00 2001 From: Stephane Bortzmeyer Date: Sun, 16 Jun 2024 20:36:55 +0200 Subject: [PATCH 2/3] Iran RDAP server down --- tests.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests.yaml b/tests.yaml index 597b22b..c2d3b00 100644 --- a/tests.yaml +++ b/tests.yaml @@ -143,14 +143,14 @@ tests: retcode: 0 stderr: '' - # Iran, expiration date in the past - - exe: './check_expire' - args: - - '-H' - - 'nic.pars' - retcode: 2 - partstdout: "already expired" - stderr: '' + # Iran, expiration date in the past. But down (2024-06-16) + #- exe: './check_expire' + # args: + # - '-H' + # - 'nic.pars' + # retcode: 2 + # partstdout: "already expired" + # stderr: '' # Brazil - exe: './check_expire' From f7e355702f1a17a6ae0fc3524cabde87d2d40565 Mon Sep 17 00:00:00 2001 From: Stephane Bortzmeyer Date: Sun, 16 Jun 2024 20:37:42 +0200 Subject: [PATCH 3/3] Post-merge cleaning --- check_expire | 1 - 1 file changed, 1 deletion(-) diff --git a/check_expire b/check_expire index 625e9f3..329304e 100755 --- a/check_expire +++ b/check_expire @@ -149,7 +149,6 @@ for server in servers: else: found = True break ->>>>>>> 3af8b3103483d8f542475b824fce57e28d58e242 if not found: if errors != "": error(errors)