示例#1
0
 def testScenario1(self):
     port = "79"
     utils.before("scenario1",
                  [utils.getuser(), constants.SC1_FILE_SERVERPY, port])
     res, code = utils.sr_cmd(
         "-r role1 -c 'python %s -p %s'" %
         (constants.SC1_FILE_SERVERPY, port), 1)
     utils.multipleAssertCommand(res, code, code == 0, res.count("OK") == 1)
     utils.after()
示例#2
0
 def testUserInfoCommandArgNoRole(self):
     utils.before("testInfo/infousernorole")
     res, code = utils.sr_cmd("-i -c null")
     utils.multipleAssertCommand(
         res, code, code == 0,
         utils.assertCount(res, r"you can\\'t execute this command", 1),
         utils.assertCount(res, "sr -c", 0),
         utils.assertCount(res, "roles", 0),
         utils.assertCount(res, "null", 0))
     utils.after()
示例#3
0
 def setUp(self):
     utils.before("testInfo/infouser", [utils.getuser()])
     return super().setUp()
示例#4
0
 def setUp(self):
     utils.before("testInfo/infogroup", utils.getgroups())
     return super().setUp()
示例#5
0
 def setUp(self):
     utils.before("testRoles/configuration4", ["null"] + utils.getgroups())
     return super().setUp()
示例#6
0
 def setUp(self):
     utils.before("testRoles/configuration1", [utils.getuser()])
     return super().setUp()