def test_register(self):
     dsc.distro_category = dsc.get_distro_category()
     dsc.hutil = MockUtil(self)
     dsc.install_dsc_packages()
     dsc.start_omiservice()
     exit_code, output = dsc.register_automation('somekey','http://dummy','','','','')
     self.assertEqual(exit_code, 0)
 def test_register_without_registration_info(self):
     dsc.distro_category = dsc.get_distro_category()
     dsc.hutil = MockUtil(self)
     dsc.install_dsc_packages()
     dsc.start_omiservice()
     exit_code, output = dsc.register_automation('','','','','','')
     self.assertEqual(exit_code, 51)
Esempio n. 3
0
 def test_register(self):
     print "Register test case with valid parameters"
     dsc.distro_category = dsc.get_distro_category()
     dsc.hutil = MockUtil(self)
     dsc.install_dsc_packages()
     dsc.start_omiservice()
     exit_code, output = dsc.register_automation('somekey','http://dummy','test.localhost.mof','15','30','applyandmonitor')
     self.assertEqual(exit_code, 0)
Esempio n. 4
0
 def test_register_invalid_configuration_mode(self):
     print "Register test case with invalid configuration mode"
     dsc.distro_category = dsc.get_distro_category()
     dsc.hutil = MockUtil(self)
     dsc.install_dsc_packages()
     dsc.start_omiservice()
     exit_code, output = dsc.register_automation('somekey','http://dummy','','','','some')	
     self.assertEqual(exit_code, 51)
 def test_register_without_registration_info(self):
     print "Register test case with invalid Registration url and Registration key"
     dsc.distro_category = dsc.get_distro_category()
     dsc.hutil = MockUtil(self)
     dsc.install_dsc_packages()
     dsc.start_omiservice()
     exit_code, output = dsc.register_automation('','','','','','')
     self.assertEqual(exit_code, 51)
 def test_is_statusfile_update_register(self):
     status_file = 'status/0.status'
     dsc.distro_category = dsc.get_distro_category()
     dsc.hutil = MockUtil(self)
     dsc.install_dsc_packages()
     dsc.start_omiservice()
     exit_code, output = dsc.register_automation('somekey','http://dummy','','','','')
     self.verify_nodeid_vmuuid(status_file)
Esempio n. 7
0
 def test_is_statusfile_update_register(self):
     status_file = 'status/0.status'
     dsc.distro_category = dsc.get_distro_category()
     dsc.hutil = MockUtil(self)
     dsc.install_dsc_packages()
     dsc.start_omiservice()
     exit_code, output = dsc.register_automation('somekey','http://dummy','','','','')
     self.verify_nodeid_vmuuid(status_file)