Skip to content

Commit

Permalink
Fix test setup now that sql insertion failures are reported as such.
Browse files Browse the repository at this point in the history
  • Loading branch information
miodvallat committed Jan 20, 2025
1 parent af08518 commit ad57d1b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions regression-tests.auth-py/test_GSSTSIG.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@ class GSSTSIGBase(AuthTest):
'KRB5_KTNAME' : './kerberos-client/kt.keytab'
}

@classmethod
def secureZone(cls, confdir, zonename, key=None):
# This particular test uses a sqlite-only configuration, unlike
# all the other tests in that directory. Because of this, we
# need to perform an explicit create-zone, otherwise import-zone-key
# would fail.
zone = '.' if zonename == 'ROOT' else zonename
pdnsutilCmd = [os.environ['PDNSUTIL'],
'--config-dir=%s' % confdir,
'create-zone',
zone]
print(' '.join(pdnsutilCmd))
try:
subprocess.check_output(pdnsutilCmd, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
raise AssertionError('%s failed (%d): %s' % (pdnsutilCmd, e.returncode, e.output))
super(GSSTSIGBase, cls).secureZone(confdir, zonename, key)

@classmethod
def setUpClass(cls):
super(GSSTSIGBase, cls).setUpClass()
Expand Down

0 comments on commit ad57d1b

Please sign in to comment.