Commit 1ae4370d authored by Adrien Dorsaz's avatar Adrien Dorsaz

staging_test_acme_dns_tiny: tearDown should not try to parse cname_csr as a config file

parent baac0d4a
Pipeline #268 passed with stages
in 22 minutes and 19 seconds
......@@ -41,22 +41,22 @@ class TestACMEDNSTiny(unittest.TestCase):
def tearDownClass(cls):
# close temp files correctly
for conffile in cls.configs:
parser = configparser.ConfigParser()
parser.read(cls.configs[conffile])
try:
# for each configuration, deactivate the account key
if conffile != "cname_csr":
# for each configuration file, deactivate the account and remove linked temporary files
if conffile != "cname_csr":
parser = configparser.ConfigParser()
parser.read(cls.configs[conffile])
try:
account_deactivate(parser["acmednstiny"]["AccountKeyFile"], ACME_DIRECTORY)
except:
pass
try:
os.remove(parser["acmednstiny"]["AccountKeyFile"])
except:
pass
try:
os.remove(parser["acmednstiny"]["CSRFile"])
except:
pass
except:
pass
try:
os.remove(parser["acmednstiny"]["AccountKeyFile"])
except:
pass
try:
os.remove(parser["acmednstiny"]["CSRFile"])
except:
pass
try:
os.remove(cls.configs[conffile])
except:
......@@ -65,7 +65,7 @@ class TestACMEDNSTiny(unittest.TestCase):
# helper function to valid success by making assertion on returned certificate chain
def _assert_certificate_chain(self, cert_chain):
# Output have to contains two certiicates
# Output have to contains two certificates
certlist = cert_chain.split("-----BEGIN CERTIFICATE-----")
self.assertEqual(3, len(certlist))
self.assertEqual('', certlist[0])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment