mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
tests/krb5: Unconditionally check compressed claims
not only if STRICT_CHECKING=1. This also fixes a bug where the call to huffman_decompress() was indented incorrectly. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
04fd475b43
commit
3c333037cd
@ -3571,19 +3571,18 @@ class RawKerberosTest(TestCaseInTempDir):
|
||||
uncompressed_size = client_claims.uncompressed_claims_set_size
|
||||
compression_format = client_claims.compression_format
|
||||
|
||||
if self.strict_checking:
|
||||
if uncompressed_size < 384:
|
||||
self.assertEqual(claims.CLAIMS_COMPRESSION_FORMAT_NONE,
|
||||
compression_format,
|
||||
f'{claims_type} unexpectedly '
|
||||
f'compressed ({uncompressed_size} '
|
||||
f'bytes uncompressed)')
|
||||
else:
|
||||
self.assertEqual(
|
||||
claims.CLAIMS_COMPRESSION_FORMAT_XPRESS_HUFF,
|
||||
compression_format,
|
||||
f'{claims_type} unexpectedly not compressed '
|
||||
f'({uncompressed_size} bytes uncompressed)')
|
||||
if uncompressed_size < 384:
|
||||
self.assertEqual(claims.CLAIMS_COMPRESSION_FORMAT_NONE,
|
||||
compression_format,
|
||||
f'{claims_type} unexpectedly '
|
||||
f'compressed ({uncompressed_size} '
|
||||
f'bytes uncompressed)')
|
||||
else:
|
||||
self.assertEqual(
|
||||
claims.CLAIMS_COMPRESSION_FORMAT_XPRESS_HUFF,
|
||||
compression_format,
|
||||
f'{claims_type} unexpectedly not compressed '
|
||||
f'({uncompressed_size} bytes uncompressed)')
|
||||
|
||||
claims_data = huffman_decompress(claims_data,
|
||||
uncompressed_size)
|
||||
|
Loading…
x
Reference in New Issue
Block a user