def test_positive_sc_params_by_name(self): """Check if environment sc-param subcommand works passing an environment name @Feature: Environment @Assert: The command runs without raising an error """ environment = make_environment() Environment.sc_params({'environment': environment['name']})
def test_positive_sc_params_by_name(self): """Check if environment sc-param subcommand works passing an environment name @id: e2fdd262-9b09-4252-8a5a-4e578e3b8547 @Assert: The command runs without raising an error """ environment = make_environment() Environment.sc_params({'environment': environment['name']})
def test_positive_sc_params_by_id(self): """Check if environment sc-param subcommand works passing an environment id @id: 32de4f0e-7b52-411c-a111-9ed472c3fc34 @Assert: The command runs without raising an error """ environment = make_environment() Environment.sc_params({'environment-id': environment['id']})
def test_positive_sc_params_by_name(self): """Check if environment sc-param subcommand works passing an environment name @Feature: Environment @Assert: The command runs without raising an error @BZ: 1219934 """ environment = make_environment() Environment.sc_params({ 'environment': environment['name'], }) if not bz_bug_is_open(1219934): self.fail('BZ #1219934 is closed, should assert the content')
def test_sc_params_by_environment_name(self): """@Test: Check if environment sc-param subcommand works passing an environment name @Feature: Environment @Assert: The command runs without raising an error @BZ: 1219934 """ environment = make_environment() Environment.sc_params({ 'environment': environment['name'], }) if not bz_bug_is_open(1219934): self.fail('BZ #1219934 is closed, should assert the content')
def test_positive_sc_params_by_name(self): """Check if environment sc-param subcommand works passing an environment name :id: e2fdd262-9b09-4252-8a5a-4e578e3b8547 :expectedresults: The command runs without raising an error :CaseImportance: Critical """ sc_params_list = SmartClassParameter.list({ 'environment': self.env['name'], 'search': u'puppetclass="{0}"'.format(self.puppet_class['name']) }) scp_id = choice(sc_params_list)['id'] SmartClassParameter.update({'id': scp_id, 'override': 1}) # Verify that affected sc-param is listed env_scparams = Environment.sc_params( {'environment': self.env['name']}) self.assertIn(scp_id, [scp['id'] for scp in env_scparams])
def test_sc_params_by_environment_id(self): """@Test: Check if environment sc-param subcommand works passing an environment id @Feature: Environment @Assert: The command runs without raising an error @BZ: 1219934 """ environment = make_environment() result = Environment.sc_params({ 'environment-id': environment['id'], }) self.assertEqual(result.return_code, 0) self.assertEqual(len(result.stderr), 0) if not bz_bug_is_open(1219934): self.fail('BZ #1219934 is closed, should assert the content')
def test_positive_sc_params(module_import_puppet_module): """Check if environment sc-param subcommand works passing an environment id :id: 32de4f0e-7b52-411c-a111-9ed472c3fc34 :expectedresults: The command runs without raising an error """ # Override one of the sc-params from puppet class sc_params_list = SmartClassParameter.list( { 'environment': module_import_puppet_module['env'], 'search': f'puppetclass="{module_import_puppet_module["puppet_class"]}"', } ) scp_id = choice(sc_params_list)['id'] SmartClassParameter.update({'id': scp_id, 'override': 1}) # Verify that affected sc-param is listed env_scparams = Environment.sc_params({'environment': module_import_puppet_module['env']}) assert scp_id in [scp['id'] for scp in env_scparams]
def test_positive_sc_params_by_id(self): """Check if environment sc-param subcommand works passing an environment id :id: 32de4f0e-7b52-411c-a111-9ed472c3fc34 :expectedresults: The command runs without raising an error :CaseImportance: Critical """ # Override one of the sc-params from puppet class sc_params_list = SmartClassParameter.list({ 'environment': self.env['name'], 'search': u'puppetclass="{0}"'.format(self.puppet_class['name']) }) scp_id = choice(sc_params_list)['id'] SmartClassParameter.update({'id': scp_id, 'override': 1}) # Verify that affected sc-param is listed env_scparams = Environment.sc_params( {'environment-id': self.env['id']}) self.assertIn(scp_id, [scp['id'] for scp in env_scparams])
def test_positive_sc_params_by_name(self): """Check if environment sc-param subcommand works passing an environment name :id: e2fdd262-9b09-4252-8a5a-4e578e3b8547 :expectedresults: The command runs without raising an error :CaseImportance: Critical """ sc_params_list = SmartClassParameter.list({ 'environment': self.env['name'], 'search': u'puppetclass="{0}"'.format(self.puppet_class['name']) }) scp_id = choice(sc_params_list)['id'] SmartClassParameter.update({'id': scp_id, 'override': 1}) # Verify that affected sc-param is listed env_scparams = Environment.sc_params({'environment': self.env['name']}) self.assertIn(scp_id, [scp['id'] for scp in env_scparams])
def test_positive_sc_params(self): """Check if environment sc-param subcommand works passing an environment id :id: 32de4f0e-7b52-411c-a111-9ed472c3fc34 :expectedresults: The command runs without raising an error """ # Override one of the sc-params from puppet class sc_params_list = SmartClassParameter.list({ 'environment': self.env['name'], 'search': u'puppetclass="{0}"'.format(self.puppet_class['name']) }) scp_id = choice(sc_params_list)['id'] SmartClassParameter.update({'id': scp_id, 'override': 1}) # Verify that affected sc-param is listed env_scparams = Environment.sc_params( {'environment-id': self.env['id']}) self.assertIn(scp_id, [scp['id'] for scp in env_scparams])