Commit 6b454a54 authored by Adrien Dorsaz's avatar Adrien Dorsaz

tests: acme_dns_tiny: fix tearDown clean configuration files

parent a872cd75
Pipeline #266 failed with stages
in 10 minutes and 14 seconds
...@@ -42,7 +42,7 @@ class TestACMEDNSTiny(unittest.TestCase): ...@@ -42,7 +42,7 @@ class TestACMEDNSTiny(unittest.TestCase):
# close temp files correctly # close temp files correctly
for conffile in cls.configs: for conffile in cls.configs:
parser = configparser.ConfigParser() parser = configparser.ConfigParser()
parser.read(conffile) parser.read(cls.configs[conffile])
try: try:
os.remove(parser["acmednstiny"]["AccountKeyFile"]) os.remove(parser["acmednstiny"]["AccountKeyFile"])
except: except:
...@@ -58,7 +58,7 @@ class TestACMEDNSTiny(unittest.TestCase): ...@@ -58,7 +58,7 @@ class TestACMEDNSTiny(unittest.TestCase):
except: except:
pass pass
try: try:
os.remove(conffile) os.remove(cls.configs[conffile])
except: except:
pass pass
super(TestACMEDNSTiny, cls).tearDownClass() super(TestACMEDNSTiny, cls).tearDownClass()
......
...@@ -25,10 +25,10 @@ class TestACMEDNSTiny(unittest.TestCase): ...@@ -25,10 +25,10 @@ class TestACMEDNSTiny(unittest.TestCase):
# close temp files correctly # close temp files correctly
for conffile in cls.configs: for conffile in cls.configs:
parser = configparser.ConfigParser() parser = configparser.ConfigParser()
parser.read(conffile) parser.read(cls.configs[conffile])
os.remove(parser["acmednstiny"]["AccountKeyFile"]) os.remove(parser["acmednstiny"]["AccountKeyFile"])
os.remove(parser["acmednstiny"]["CSRFile"]) os.remove(parser["acmednstiny"]["CSRFile"])
os.remove(conffile) os.remove(cls.configs[conffile])
super(TestACMEDNSTiny, cls).tearDownClass() super(TestACMEDNSTiny, cls).tearDownClass()
......
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