예제 #1
0
 def test_get_by_name_as_table(self):
     result = self.cli_runner.invoke(cli, [
         'get', 'deploymentlocation', self.test_case_props['dl_A']['name'], '-e', 'default'
         ])
     table_format = TableFormat(table=DeploymentLocationTable())
     expected_output = table_format.convert_element(self._build_deployment_location_output(self.test_case_props['dl_A']))
     self.assert_output(result, expected_output)
예제 #2
0
 def test_get_by_name_as_table(self):
     result = self.cli_runner.invoke(cli, [
         'get', 'descriptor', self.test_case_props['descriptor_A']['name'], '-e', 'default'
         ])
     table_format = TableFormat(table=DescriptorTable())
     expected_output = table_format.convert_element(self.test_case_props['descriptor_A'])
     self.assert_output(result, expected_output)
예제 #3
0
 def test_get_by_name_as_table(self):
     result = self.cli_runner.invoke(cli, [
         'get', 'infrastructurekey', self.test_case_props['key_A']['name'], '-e', 'default', '--include-private'
         ])
     table_format = TableFormat(table=InfrastructureKeyTable())
     expected_output = table_format.convert_element(self.test_case_props['key_A'])
     self.assert_output(result, expected_output)
예제 #4
0
 def test_get_all_as_table(self):
     result = self.cli_runner.invoke(cli, ['get', 'env', 'default'])
     table_format = TableFormat(table=EnvironmentTable())
     ctl = get_global_controller()
     expected_output = table_format.convert_element(
         ctl.config.environments.get('default', None))
     self.assert_output(result, expected_output)
예제 #5
0
 def test_get_by_id_as_table(self):
     result = self.cli_runner.invoke(cli, [
         'get', 'assemblyconfig',
         self.test_case_props['assembly_config_A']['id'], '-e', 'default'
     ])
     table_format = TableFormat(table=AssemblyConfigurationTable())
     expected_output = table_format.convert_element(
         self.test_case_props['assembly_config_A'])
     self.assert_output(result, expected_output)
예제 #6
0
 def test_get_by_name_as_table(self):
     result = self.cli_runner.invoke(cli, [
         'get', 'behaviourproject', self.test_case_props['project_A']['id'],
         '-e', 'default'
     ])
     table_format = TableFormat(table=ProjectTable())
     expected_output = table_format.convert_element(
         self.test_case_props['project_A'])
     self.assert_output(result, expected_output)
예제 #7
0
 def test_get_by_type(self):
     result = self.cli_runner.invoke(cli, [
         'get', 'resourcedriver', '-e', 'default', '--type',
         self.test_case_props['driver_B']['type']
     ])
     table_format = TableFormat(table=ResourceDriverTable())
     expected_output = table_format.convert_element(
         self.test_case_props['driver_B'])
     self.assert_output(result, expected_output)
예제 #8
0
 def test_get_by_id_as_table(self):
     result = self.cli_runner.invoke(cli, [
         'get', 'scenario', self.test_case_props['scenario_A']['id'], '-e',
         'default'
     ])
     table_format = TableFormat(table=ScenarioTable())
     expected_output = table_format.convert_element(
         self.test_case_props['scenario_A'])
     self.assert_output(result, expected_output)
예제 #9
0
파일: test_processes.py 프로젝트: IBM/lmctl
 def test_query(self):
     assembly_name = self.tester.exec_prepended_name('process-cmd-query')
     process_id, assembly_id = self._create_assembly(assembly_name)
     result = self.cli_runner.invoke(cli, [
         'get', 'process', '-e', 'default', '--assembly-name', assembly_name
     ])
     table_format = TableFormat(table=ProcessTable())
     target_process = self.tester.default_client.processes.get(process_id)
     expected_output = table_format.convert_element(target_process)
     self.assert_output(result, expected_output)
     self.tester.wait_until(self._build_check_process_success(self.tester),
                            process_id)
     self._delete_and_wait(assembly_name)