]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Unconditionally check compressed claims
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 2 Mar 2023 22:39:55 +0000 (11:39 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 8 Mar 2023 04:39:32 +0000 (04:39 +0000)
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>
python/samba/tests/krb5/raw_testcase.py

index c3af7d955d1185ebc650f46b1690afadb365d3e8..ead7d98f1a3bcd59afe0c431d855625fe2aa1428 100644 (file)
@@ -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)