[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Thu Apr 6 15:43:01 UTC 2023


The branch, master has been updated
       via  c50cde0cd5e python:tests: Correctly skip some GPO tests in release tarball
      from  484bf9c49ae testprogs: Remove unused test_export_keytab_(heimdal|mit).sh

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c50cde0cd5e58f895cee3fe87768e9875a537b4d
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Mar 16 12:58:21 2023 +0100

    python:tests: Correctly skip some GPO tests in release tarball
    
    These tests require provision data we do not ship in release tarballs.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    
    Autobuild-User(master): Günther Deschner <gd at samba.org>
    Autobuild-Date(master): Thu Apr  6 15:42:12 UTC 2023 on atb-devel-224

-----------------------------------------------------------------------

Summary of changes:
 python/samba/tests/samba_tool/gpo.py | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)


Changeset truncated at 500 lines:

diff --git a/python/samba/tests/samba_tool/gpo.py b/python/samba/tests/samba_tool/gpo.py
index c9248d32fd4..e49944c204d 100644
--- a/python/samba/tests/samba_tool/gpo.py
+++ b/python/samba/tests/samba_tool/gpo.py
@@ -140,6 +140,7 @@ ext_guids = ['{123d2b56-7b14-4516-bbc4-763d29d57654}',
              '{d000e91b-e70f-481b-9549-58de7929bcee}']
 
 source_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../../.."))
+provision_path = os.path.join(source_path, "source4/selftest/provisions/")
 
 def has_difference(path1, path2, binary=True, xml=True, sortlines=False):
     """Use this function to determine if the GPO backup differs from another.
@@ -266,6 +267,10 @@ class GpoCmdTestCase(SambaToolCmdTest):
     def test_backup_restore_compare_binary(self):
         """Restore from a static backup and compare the binary contents"""
 
+        if not os.path.exists(provision_path):
+            self.skipTest('Test requires provision data not available in '
+                          + 'release tarball')
+
         static_path = os.path.join(self.backup_path, 'policy',
                                    self.backup_gpo_guid)
 
@@ -321,6 +326,10 @@ class GpoCmdTestCase(SambaToolCmdTest):
         """Restore from a static backup (and use no entity file, resulting in
         copy-restore fallback), and compare the binary contents"""
 
+        if not os.path.exists(provision_path):
+            self.skipTest('Test requires provision data not available in '
+                          + 'release tarball')
+
         static_path = os.path.join(self.backup_path, 'policy',
                                    self.backup_gpo_guid)
 
@@ -412,6 +421,11 @@ class GpoCmdTestCase(SambaToolCmdTest):
 
     def test_backup_restore_backup_compare_XML(self):
         """Restore from a static backup and backup to compare XML"""
+
+        if not os.path.exists(provision_path):
+            self.skipTest('Test requires provision data not available in '
+                          + 'release tarball')
+
         static_path = os.path.join(self.backup_path, 'policy',
                                    self.backup_gpo_guid)
 
@@ -502,6 +516,11 @@ class GpoCmdTestCase(SambaToolCmdTest):
     def test_backup_restore_generalize(self):
         """Restore from a static backup with different entities, generalize it
         again, and compare the XML"""
+
+        if not os.path.exists(provision_path):
+            self.skipTest('Test requires provision data not available in '
+                          + 'release tarball')
+
         static_path = os.path.join(self.backup_path, 'policy',
                                    self.backup_gpo_guid)
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list