def setUp(self): '''Setup for tests''' # Test Packages self.TEXT_PKG_REMOVE_LIST = ['pkg:/system/install/media/internal', 'pkg:/system/install/text-install'] # packages added to the cleanup list self.add_files = ['file1', 'file2', 'file3'] self.filesys_files = ['/var/tmp/test_dir/', '/var/tmp/file1', '/var/tmp/file2', '/mnt/test_dir/file1', '/mnt/file2', '/mnt/file3', '/save/etc/gconf/schemas/panel-default-setup.entries', '/save/etc/X11/gdm/custom.conf', '/save/etc/xdg/autostart/updatemanagernotifier.desktop', '/save/usr/share/dbus-1/services/gnome-power-manager.service', '/save/usr/share/gnome/autostart/gnome-keyring-daemon-wrapper.desktop', '.livecd', '.volsetid', '.textinstall', 'etc/sysconfig/language', '.liveusb', 'a', 'bootcd_microroot', 'var/user/jack', 'var/cache/gdm/jack/dmrc', 'var/cache/gdm/jack/', '/save/bogus'] self.test_target = create_filesystem(*self.filesys_files) # Create a data object to hold the required data self.simple = CreateSimpleDataObjectCache(test_target=self.test_target)
def setUp(self): # Set up the Target directory self.test_target = tempfile.mkdtemp(dir="/tmp", prefix="ict_test_") os.chmod(self.test_target, 0777) # Create a data object to hold the required data self.simple = CreateSimpleDataObjectCache(test_target=self.test_target) # Instantiate the checkpoint self.dev_cfg = DeviceConfig("DC")
def setUp(self): # Set up the Target directory self.test_target = tempfile.mkdtemp(dir="/tmp", prefix="ict_test_") os.chmod(self.test_target, 0777) # Create a data object to hold the required data self.simple = CreateSimpleDataObjectCache(self.test_target) # Instantiate the checkpoint self.create_snap = CreateSnapshot("CS")
def setUp(self): # Set up the Target directory self.test_target = tempfile.mkdtemp(dir="/tmp", prefix="ict_test_") os.chmod(self.test_target, 0777) # Create a data object to hold the required data self.simple = CreateSimpleDataObjectCache(test_target=self.test_target) # Instantiate the checkpoint self.boot_arch = BootArchive("BA")
def setUp(self): # Set up the Target directory self.test_target = tempfile.mkdtemp(dir="/tmp", prefix="ict_test_") os.chmod(self.test_target, 0777) # Create a data object to hold the required data self.simple = CreateSimpleDataObjectCache(test_target=self.test_target) # Instantiate the checkpoint self.ud = UpdateDumpAdm("UD") # Create a test file name self.test_file = os.path.join(self.test_target, 'etc/dumpadm.conf')
def setUp(self): # Set up the Target directory self.test_target = tempfile.mkdtemp(dir="/tmp/", prefix="ict_test_") os.chmod(self.test_target, 0777) # Create a data object to hold the required data self.simple = CreateSimpleDataObjectCache(test_target=self.test_target) # Instantiate the checkpoint self.smf = InitializeSMF("IS") self.smf_filelist = ['lib/svc/seed/global.db', 'etc/svc/profile/generic_limited_net.xml', 'etc/svc/profile/ns_dns.xml', 'etc/svc/profile/inetd_generic.xml', 'etc/svc/profile/sc_profile.xml'] self.sys_profile_dict = {'generic_limited_net.xml': os.path.join(self.test_target, 'etc/svc/profile/generic.xml'), 'ns_dns.xml': os.path.join(self.test_target, 'etc/svc/profile/name_service.xml'), 'inetd_generic.xml': os.path.join(self.test_target, 'etc/svc/profile/inetd_services.xml'), 'sc_profile.xml': os.path.join(self.test_target, 'etc/svc/profile/site.xml')} for smf_file in self.smf_filelist: # create the directory if it doesn't exist if not os.path.exists(os.path.join(self.test_target, os.path.dirname(smf_file))): os.makedirs(os.path.join(self.test_target, os.path.dirname(smf_file))) # touch the file with open(os.path.join(self.test_target, smf_file), "w+") as fh: pass for key, value in self.sys_profile_dict.items(): os.symlink(key, value)
def setUp(self): # Set up the Target directory self.test_target = tempfile.mkdtemp(dir="/tmp/", prefix="ict_test_") os.chmod(self.test_target, 0777) # Create a data object to hold the required data self.simple = CreateSimpleDataObjectCache(test_target=self.test_target) self.doc = InstallEngine.get_instance().data_object_cache self.trans_dict = {} self.dod = None '''Create a transfer source and destination''' source = os.path.join(self.test_target, "var/run/install_log") dest = "/var/sadm/install/" if not os.path.exists(os.path.dirname(source)): os.makedirs(os.path.dirname(source)) open(source, 'w').close() self.trans_dict = {source: dest} # Instantiate the checkpoint self.trans_files = TransferFiles("TFS")