mirror of
https://github.com/mirror/wget.git
synced 2025-02-05 17:20:12 +08:00
Fix usage of Magic number of tests
testenv/test/base_test.py: Add new variable SKIP_TEST testenv/Test--https-crl.py: Use SKIP_TEST instead of magic number testenv/Test--https.py: Same testenv/Test-hsts.py: Same testenv/Test-no_proxy-env.py: Same testenv/Test-pinnedpubkey-der-https.py: Same testenv/Test-pinnedpubkey-der-no-check-https.py: Same testenv/Test-pinnedpubkey-hash-https.py: Same testenv/Test-pinnedpubkey-hash-no-check-fail-https.py: Same testenv/Test-pinnedpubkey-pem-fail-https.py: Same testenv/Test-pinnedpubkey-pem-https.py: Same
This commit is contained in:
parent
7c4d053902
commit
010cb79b43
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from sys import exit
|
||||
from test.http_test import HTTPTest
|
||||
from test.base_test import HTTP, HTTPS
|
||||
from test.base_test import HTTPS, SKIP_TEST
|
||||
from misc.wget_file import WgetFile
|
||||
import os
|
||||
|
||||
@ -9,7 +9,7 @@ import os
|
||||
This test ensures that Wget can download files from HTTPS Servers
|
||||
"""
|
||||
if os.getenv('SSL_TESTS') is None:
|
||||
exit (77)
|
||||
exit (SKIP_TEST)
|
||||
|
||||
############# File Definitions ###############################################
|
||||
File1 = "Would you like some Tea?"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from sys import exit
|
||||
from test.http_test import HTTPTest
|
||||
from test.base_test import HTTP, HTTPS
|
||||
from test.base_test import HTTPS
|
||||
from misc.wget_file import WgetFile
|
||||
import os
|
||||
|
||||
@ -9,7 +9,7 @@ import os
|
||||
This test ensures that Wget can download files from HTTPS Servers
|
||||
"""
|
||||
if os.getenv('SSL_TESTS') is None:
|
||||
exit (77)
|
||||
exit (SKIP_TEST)
|
||||
|
||||
############# File Definitions ###############################################
|
||||
File1 = "Would you like some Tea?"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from sys import exit
|
||||
from test.http_test import HTTPTest
|
||||
from test.base_test import HTTP, HTTPS
|
||||
from test.base_test import HTTPS, SKIP_TEST
|
||||
from misc.wget_file import WgetFile
|
||||
import time
|
||||
import os
|
||||
@ -12,7 +12,7 @@ This test makes sure Wget can parse a given HSTS database and apply the indicate
|
||||
|
||||
print (os.getenv('SSL_TESTS'))
|
||||
if os.getenv('SSL_TESTS') is None:
|
||||
exit (77)
|
||||
exit (SKIP_TEST)
|
||||
|
||||
def hsts_database_path():
|
||||
hsts_file = ".wget-hsts-testenv"
|
||||
|
@ -2,6 +2,7 @@
|
||||
import socket
|
||||
from sys import exit
|
||||
from test.http_test import HTTPTest
|
||||
from test.base_test import SKIP_TEST
|
||||
from test.base_test import HTTP
|
||||
from misc.wget_file import WgetFile
|
||||
|
||||
@ -36,7 +37,7 @@ for hostname in hostnames_to_check:
|
||||
except socket.gaierror as _:
|
||||
# resolution of the name fails
|
||||
# return value 77 -> SKIP
|
||||
exit(77)
|
||||
exit(SKIP_TEST)
|
||||
|
||||
# File Definitions
|
||||
File1 = "Would you like some Tea?"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from sys import exit
|
||||
from test.http_test import HTTPTest
|
||||
from test.base_test import HTTP, HTTPS
|
||||
from test.base_test import HTTPS, SKIP_TEST
|
||||
from misc.wget_file import WgetFile
|
||||
import os
|
||||
|
||||
@ -9,7 +9,7 @@ import os
|
||||
This test ensures that Wget can download files from HTTPS Servers
|
||||
"""
|
||||
if os.getenv('SSL_TESTS') is None:
|
||||
exit (77)
|
||||
exit (SKIP_TEST)
|
||||
|
||||
############# File Definitions ###############################################
|
||||
File1 = "Would you like some Tea?"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from sys import exit
|
||||
from test.http_test import HTTPTest
|
||||
from test.base_test import HTTP, HTTPS
|
||||
from test.base_test import HTTPS, SKIP_TEST
|
||||
from misc.wget_file import WgetFile
|
||||
import os
|
||||
|
||||
@ -9,7 +9,7 @@ import os
|
||||
This test ensures that Wget can download files from HTTPS Servers
|
||||
"""
|
||||
if os.getenv('SSL_TESTS') is None:
|
||||
exit (77)
|
||||
exit (SKIP_TEST)
|
||||
|
||||
############# File Definitions ###############################################
|
||||
File1 = "Would you like some Tea?"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from sys import exit
|
||||
from test.http_test import HTTPTest
|
||||
from test.base_test import HTTP, HTTPS
|
||||
from test.base_test import HTTPS, SKIP_TEST
|
||||
from misc.wget_file import WgetFile
|
||||
import os
|
||||
|
||||
@ -9,7 +9,7 @@ import os
|
||||
This test ensures that Wget can download files from HTTPS Servers
|
||||
"""
|
||||
if os.getenv('SSL_TESTS') is None:
|
||||
exit (77)
|
||||
exit (SKIP_TEST)
|
||||
|
||||
############# File Definitions ###############################################
|
||||
File1 = "Would you like some Tea?"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from sys import exit
|
||||
from test.http_test import HTTPTest
|
||||
from test.base_test import HTTP, HTTPS
|
||||
from test.base_test import HTTPS, SKIP_TEST
|
||||
from misc.wget_file import WgetFile
|
||||
import os
|
||||
|
||||
@ -9,7 +9,7 @@ import os
|
||||
This test ensures that Wget can download files from HTTPS Servers
|
||||
"""
|
||||
if os.getenv('SSL_TESTS') is None:
|
||||
exit (77)
|
||||
exit (SKIP_TEST)
|
||||
|
||||
############# File Definitions ###############################################
|
||||
File1 = "Would you like some Tea?"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from sys import exit
|
||||
from test.http_test import HTTPTest
|
||||
from test.base_test import HTTP, HTTPS
|
||||
from test.base_test import HTTPS, SKIP_TEST
|
||||
from misc.wget_file import WgetFile
|
||||
import os
|
||||
|
||||
@ -9,7 +9,7 @@ import os
|
||||
This test ensures that Wget can download files from HTTPS Servers
|
||||
"""
|
||||
if os.getenv('SSL_TESTS') is None:
|
||||
exit (77)
|
||||
exit (SKIP_TEST)
|
||||
|
||||
############# File Definitions ###############################################
|
||||
File1 = "Would you like some Tea?"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from sys import exit
|
||||
from test.http_test import HTTPTest
|
||||
from test.base_test import HTTP, HTTPS
|
||||
from test.base_test import HTTPS, SKIP_TEST
|
||||
from misc.wget_file import WgetFile
|
||||
import os
|
||||
|
||||
@ -9,7 +9,7 @@ import os
|
||||
This test ensures that Wget can download files from HTTPS Servers
|
||||
"""
|
||||
if os.getenv('SSL_TESTS') is None:
|
||||
exit (77)
|
||||
exit (SKIP_TEST)
|
||||
|
||||
############# File Definitions ###############################################
|
||||
File1 = "Would you like some Tea?"
|
||||
|
@ -13,6 +13,7 @@ import conf
|
||||
HTTP = "HTTP"
|
||||
HTTPS = "HTTPS"
|
||||
|
||||
SKIP_TEST = 77
|
||||
|
||||
class BaseTest:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user