Ejemplo n.º 1
0
    def setUp(self):
        ResourceBase.__init__(self)
        s.twousers_up()
        shutil.copy2(ABSPATHTESTDIR + '/test_ireg_suite.py',
                     ABSPATHTESTDIR + '/file0')
        shutil.copy2(ABSPATHTESTDIR + '/test_ireg_suite.py',
                     ABSPATHTESTDIR + '/file1')
        shutil.copy2(ABSPATHTESTDIR + '/test_ireg_suite.py',
                     ABSPATHTESTDIR + '/file2')
        shutil.copy2(ABSPATHTESTDIR + '/test_ireg_suite.py',
                     ABSPATHTESTDIR + '/file3')

        self.run_resource_setup()

        assertiCmd(s.adminsession, 'iadmin mkresc r_resc passthru', "LIST",
                   "Creating")
        assertiCmd(s.adminsession, 'iadmin mkresc m_resc passthru', "LIST",
                   "Creating")
        hostname = socket.gethostname()
        assertiCmd(
            s.adminsession,
            'iadmin mkresc l_resc unixfilesystem ' + hostname + ':/tmp/l_resc',
            "LIST", "Creating")

        assertiCmd(s.adminsession, "iadmin addchildtoresc r_resc m_resc")
        assertiCmd(s.adminsession, "iadmin addchildtoresc m_resc l_resc")
 def setUp(self):
     ResourceBase.__init__(self)
     s.twousers_up()
     self.run_resource_setup()
     self.testing_tmp_dir = '/tmp/irods-test-icommands-recursive'
     shutil.rmtree(self.testing_tmp_dir, ignore_errors=True)
     os.mkdir(self.testing_tmp_dir)
Ejemplo n.º 3
0
 def setUp(self):
     ResourceBase.__init__(self)
     s.twousers_up()
     self.run_resource_setup()
     self.testing_tmp_dir = '/tmp/irods-test-icommands-recursive'
     shutil.rmtree(self.testing_tmp_dir, ignore_errors=True)
     os.mkdir(self.testing_tmp_dir)
Ejemplo n.º 4
0
    def setUp(self):
        ResourceBase.__init__(self)
        s.twousers_up()
        self.run_resource_setup()

        # testallrules setup
        global rules30dir
        hostname = socket.gethostname()
        hostuser = getpass.getuser()
        progname = __file__
        dir_w = rules30dir + ".."
        s.adminsession.runCmd('icd')  # to get into the home directory (for testallrules assumption)
        s.adminsession.runAdminCmd('iadmin', ["mkuser", "devtestuser", "rodsuser"])
        s.adminsession.runAdminCmd(
            'iadmin', ["mkresc", "testallrulesResc", "unix file system", hostname + ":/tmp/" + hostuser + "/pydevtest_testallrulesResc"])
        s.adminsession.runCmd('imkdir', ["sub1"])
        s.adminsession.runCmd('imkdir', ["sub3"])
        s.adminsession.runCmd('imkdir', ["forphymv"])
        s.adminsession.runCmd('imkdir', ["ruletest"])
        s.adminsession.runCmd('imkdir', ["test"])
        s.adminsession.runCmd('imkdir', ["test/phypathreg"])
        s.adminsession.runCmd('imkdir', ["ruletest/subforrmcoll"])
        s.adminsession.runCmd('iput', [progname, "test/foo1"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/dcmetadatatarget"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/mdcopysource"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/mdcopydest"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/foo1"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/foo2"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/foo3"])
        s.adminsession.runCmd('icp', ["test/foo1", "forphymv/phymvfile"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/objunlink1"])
        s.adminsession.runCmd('irm', ["sub1/objunlink1"])  # put it in the trash
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/objunlink2"])
        s.adminsession.runCmd('irepl', ["-R", "testallrulesResc", "sub1/objunlink2"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/freebuffer"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/automove"])
        s.adminsession.runCmd('icp', ["test/foo1", "test/versiontest.txt"])
        s.adminsession.runCmd('icp', ["test/foo1", "test/metadata-target.txt"])
        s.adminsession.runCmd('icp', ["test/foo1", "test/ERAtestfile.txt"])
        s.adminsession.runCmd('ichmod', ["read devtestuser", "test/ERAtestfile.txt"])
        s.adminsession.runCmd('imeta', ["add", "-d", "test/ERAtestfile.txt", "Fun", "99", "Balloons"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/for_versioning.txt"])
        s.adminsession.runCmd('imkdir', ["sub1/SaveVersions"])
        s.adminsession.runCmd('iput', [dir_w + "/misc/devtestuser-account-ACL.txt", "test"])
        s.adminsession.runCmd('iput', [dir_w + "/misc/load-metadata.txt", "test"])
        s.adminsession.runCmd('iput', [dir_w + "/misc/load-usermods.txt", "test"])
        s.adminsession.runCmd('iput', [dir_w + "/misc/sample.email", "test"])
        s.adminsession.runCmd('iput', [dir_w + "/misc/email.tag", "test"])
        s.adminsession.runCmd('iput', [dir_w + "/misc/sample.email", "test/sample2.email"])
        s.adminsession.runCmd('iput', [dir_w + "/misc/email.tag", "test/email2.tag"])

        # setup for rulemsiAdmChangeCoreRE and the likes
        empty_core_file_name = 'empty.test.re'
        new_core_file_name = 'new.test.re'
        open(self.conf_dir + "/" + empty_core_file_name, 'w').close()                       # create empty file
        shutil.copy(self.conf_dir + "/core.re", self.conf_dir + "/core.re.bckp")           # back up core.re
        shutil.copy(self.conf_dir + "/core.re", self.conf_dir + "/" + new_core_file_name)   # copy core.re
Ejemplo n.º 5
0
    def setUp(self):
        ResourceBase.__init__(self)
        s.twousers_up()
        self.run_resource_setup()

        usernames = [ss.get_username() for ss in s.sessions]
        assertiCmd(s.adminsession, 'iadmin lu', 'STDOUT_MULTILINE', usernames)

        for u in usernames:
            assertiCmd(s.adminsession, 'imeta ls -u ' + u, 'STDOUT', 'None')
Ejemplo n.º 6
0
    def setUp(self):
        ResourceBase.__init__(self)
        s.twousers_up()
        self.run_resource_setup()

        user_names = [d.get('name') for d in s.users]
        assertiCmd(s.adminsession, 'iadmin lu', 'STDOUT_MULTILINE', user_names)

        for u in user_names:
            assertiCmd(s.adminsession, 'imeta ls -u ' + u, 'STDOUT', 'None')
Ejemplo n.º 7
0
    def setUp(self):
        ResourceBase.__init__(self)
        s.twousers_up()
        shutil.copy2('/bin/cp', RODSHOME + '/server/bin/cmd/mycp')
        shutil.copy2(FILESDIR + '/myWorkFlow', RODSHOME + '/server/bin/cmd/')
        shutil.copy2(FILESDIR + '/tt', RODSHOME + '/server/bin/cmd/')
        assertiCmd(s.adminsession, "iput -f " + FILESDIR + "/PHOTO.JPG /tempZone/home/rods")
	getiCmdOutput(s.adminsession, "irm -rf /tempZone/home/rods/workflow")
        assertiCmd(s.adminsession, "imkdir -p /tempZone/home/rods/workflow")

        self.run_resource_setup()
Ejemplo n.º 8
0
    def setUp(self):
        ResourceBase.__init__(self)
        s.twousers_up()
        self.run_resource_setup()

        # testallrules setup
        global rules30dir
        hostname = socket.gethostname()
        progname = __file__
        dir_w = rules30dir+".."
        s.adminsession.runCmd('icd') # to get into the home directory (for testallrules assumption)
        s.adminsession.runAdminCmd('iadmin',["mkuser","devtestuser","rodsuser"] )
        s.adminsession.runAdminCmd('iadmin',["mkresc","testallrulesResc","unix file system",hostname+":/tmp/pydevtest_testallrulesResc"] )
        s.adminsession.runCmd('imkdir', ["sub1"] )
        s.adminsession.runCmd('imkdir', ["sub3"] )
        s.adminsession.runCmd('imkdir', ["forphymv"] )
        s.adminsession.runCmd('imkdir', ["ruletest"] )
        s.adminsession.runCmd('imkdir', ["test"] )
        s.adminsession.runCmd('imkdir', ["test/phypathreg"] )
        s.adminsession.runCmd('imkdir', ["ruletest/subforrmcoll"] )
        s.adminsession.runCmd('iput', [progname,"test/foo1"] )
        s.adminsession.runCmd('icp', ["test/foo1","sub1/dcmetadatatarget"] )
        s.adminsession.runCmd('icp', ["test/foo1","sub1/mdcopysource"] )
        s.adminsession.runCmd('icp', ["test/foo1","sub1/mdcopydest"] )
        s.adminsession.runCmd('icp', ["test/foo1","sub1/foo1"] )
        s.adminsession.runCmd('icp', ["test/foo1","sub1/foo2"] )
        s.adminsession.runCmd('icp', ["test/foo1","sub1/foo3"] )
        s.adminsession.runCmd('icp', ["test/foo1","forphymv/phymvfile"] )
        s.adminsession.runCmd('icp', ["test/foo1","sub1/objunlink1"] )
        s.adminsession.runCmd('irm', ["sub1/objunlink1"] ) # put it in the trash
        s.adminsession.runCmd('icp', ["test/foo1","sub1/objunlink2"] )
        s.adminsession.runCmd('irepl', ["-R","testallrulesResc","sub1/objunlink2"] )
        s.adminsession.runCmd('icp', ["test/foo1","sub1/freebuffer"] )
        s.adminsession.runCmd('icp', ["test/foo1","sub1/automove"] )
        s.adminsession.runCmd('icp', ["test/foo1","test/versiontest.txt"] )
        s.adminsession.runCmd('icp', ["test/foo1","test/metadata-target.txt"] )
        s.adminsession.runCmd('icp', ["test/foo1","test/ERAtestfile.txt"] )
        s.adminsession.runCmd('ichmod', ["read devtestuser","test/ERAtestfile.txt"] )
        s.adminsession.runCmd('imeta', ["add","-d","test/ERAtestfile.txt","Fun","99","Balloons"] )
        s.adminsession.runCmd('icp', ["test/foo1","sub1/for_versioning.txt"] )
        s.adminsession.runCmd('imkdir', ["sub1/SaveVersions"] )
        s.adminsession.runCmd('iput', [dir_w+"/misc/devtestuser-account-ACL.txt","test"] )
        s.adminsession.runCmd('iput', [dir_w+"/misc/load-metadata.txt","test"] )
        s.adminsession.runCmd('iput', [dir_w+"/misc/load-usermods.txt","test"] )
        s.adminsession.runCmd('iput', [dir_w+"/misc/sample.email","test"] )
        s.adminsession.runCmd('iput', [dir_w+"/misc/email.tag","test"] )
        s.adminsession.runCmd('iput', [dir_w+"/misc/sample.email","test/sample2.email"] )
        s.adminsession.runCmd('iput', [dir_w+"/misc/email.tag","test/email2.tag"] )
Ejemplo n.º 9
0
    def setUp(self):
        ResourceBase.__init__(self)
        s.twousers_up()
        shutil.copy2( ABSPATHTESTDIR+'/test_ireg_suite.py', ABSPATHTESTDIR+'/file0')
        shutil.copy2( ABSPATHTESTDIR+'/test_ireg_suite.py', ABSPATHTESTDIR+'/file1')
        shutil.copy2( ABSPATHTESTDIR+'/test_ireg_suite.py', ABSPATHTESTDIR+'/file2')
        shutil.copy2( ABSPATHTESTDIR+'/test_ireg_suite.py', ABSPATHTESTDIR+'/file3')

        self.run_resource_setup()

        assertiCmd(s.adminsession, 'iadmin mkresc r_resc passthru', "LIST", "Creating" )
        assertiCmd(s.adminsession, 'iadmin mkresc m_resc passthru', "LIST", "Creating" )
        hostname = socket.gethostname()
        assertiCmd(s.adminsession, 'iadmin mkresc l_resc unixfilesystem '+hostname+':/tmp/l_resc', "LIST", "Creating" )

        assertiCmd(s.adminsession, "iadmin addchildtoresc r_resc m_resc" )
        assertiCmd(s.adminsession, "iadmin addchildtoresc m_resc l_resc" )
Ejemplo n.º 10
0
 def setUp(self):
     ResourceBase.__init__(self)
     s.twousers_up()
     self.run_resource_setup()
Ejemplo n.º 11
0
 def setUp(self):
     ResourceBase.__init__(self)
     s.twousers_up()
     self.run_resource_setup()
Ejemplo n.º 12
0
    def setUp(self):
        ResourceBase.__init__(self)
        s.twousers_up()
        self.run_resource_setup()

        # testallrules setup
        global rules30dir
        hostname = socket.gethostname()
        hostuser = getpass.getuser()
        progname = __file__
        dir_w = rules30dir + ".."
        s.adminsession.runCmd(
            'icd'
        )  # to get into the home directory (for testallrules assumption)
        s.adminsession.runAdminCmd('iadmin',
                                   ["mkuser", "devtestuser", "rodsuser"])
        s.adminsession.runAdminCmd('iadmin', [
            "mkresc", "testallrulesResc", "unix file system",
            hostname + ":/tmp/" + hostuser + "/pydevtest_testallrulesResc"
        ])
        s.adminsession.runCmd('imkdir', ["sub1"])
        s.adminsession.runCmd('imkdir', ["sub3"])
        s.adminsession.runCmd('imkdir', ["forphymv"])
        s.adminsession.runCmd('imkdir', ["ruletest"])
        s.adminsession.runCmd('imkdir', ["test"])
        s.adminsession.runCmd('imkdir', ["test/phypathreg"])
        s.adminsession.runCmd('imkdir', ["ruletest/subforrmcoll"])
        s.adminsession.runCmd('iput', [progname, "test/foo1"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/dcmetadatatarget"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/mdcopysource"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/mdcopydest"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/foo1"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/foo2"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/foo3"])
        s.adminsession.runCmd('icp', ["test/foo1", "forphymv/phymvfile"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/objunlink1"])
        s.adminsession.runCmd('irm',
                              ["sub1/objunlink1"])  # put it in the trash
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/objunlink2"])
        s.adminsession.runCmd('irepl',
                              ["-R", "testallrulesResc", "sub1/objunlink2"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/freebuffer"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/automove"])
        s.adminsession.runCmd('icp', ["test/foo1", "test/versiontest.txt"])
        s.adminsession.runCmd('icp', ["test/foo1", "test/metadata-target.txt"])
        s.adminsession.runCmd('icp', ["test/foo1", "test/ERAtestfile.txt"])
        s.adminsession.runCmd('ichmod',
                              ["read devtestuser", "test/ERAtestfile.txt"])
        s.adminsession.runCmd(
            'imeta',
            ["add", "-d", "test/ERAtestfile.txt", "Fun", "99", "Balloons"])
        s.adminsession.runCmd('icp', ["test/foo1", "sub1/for_versioning.txt"])
        s.adminsession.runCmd('imkdir', ["sub1/SaveVersions"])
        s.adminsession.runCmd(
            'iput', [dir_w + "/misc/devtestuser-account-ACL.txt", "test"])
        s.adminsession.runCmd('iput',
                              [dir_w + "/misc/load-metadata.txt", "test"])
        s.adminsession.runCmd('iput',
                              [dir_w + "/misc/load-usermods.txt", "test"])
        s.adminsession.runCmd('iput', [dir_w + "/misc/sample.email", "test"])
        s.adminsession.runCmd('iput', [dir_w + "/misc/email.tag", "test"])
        s.adminsession.runCmd(
            'iput', [dir_w + "/misc/sample.email", "test/sample2.email"])
        s.adminsession.runCmd('iput',
                              [dir_w + "/misc/email.tag", "test/email2.tag"])

        # setup for rulemsiAdmChangeCoreRE and the likes
        empty_core_file_name = 'empty.test.re'
        new_core_file_name = 'new.test.re'
        open(self.conf_dir + "/" + empty_core_file_name,
             'w').close()  # create empty file
        shutil.copy(self.conf_dir + "/core.re",
                    self.conf_dir + "/core.re.bckp")  # back up core.re
        shutil.copy(self.conf_dir + "/core.re",
                    self.conf_dir + "/" + new_core_file_name)  # copy core.re
 def setUp(self):
     ResourceBase.__init__(self)
     s.oneuser_up()
     self.run_resource_setup()
Ejemplo n.º 14
0
 def setUp(self):
     ResourceBase.__init__(self)
     s.oneuser_up()
     self.run_resource_setup()