def test_parameter_list_formatting(self, mock_dataflow_utils, mock_gcs_utils): mock_gcs_utils.return_value = None mock_dataflow_utils.return_value = None test_conf = config_parser_main.parse_config_file(get_absolute_path("_testing/test_conf.conf")) parameter_list = config_parser_main.get_jar_parameter_dict(test_conf) formatted_param_list = launcher.get_formatted_launch_parameters(parameter_list) self.assertCountEqual([ '--project=test_project_id', '--stagingLocation=gs://test_project_id-temp', '--zone=test_zone', '--jobName=test', '--appName=test', '--numWorkers=1', '--workerMachineType=test_worker_type', '--defaultWorkerLogLevel=test_logLevel', '--streaming=true', '--runner=DataflowPipelineRunner', '--autoscalingAlgorithm=THROUGHPUT_BASED', '--maxNumWorkers=10', '--subscriptionName=projects/test_project_id/subscriptions/test_subscription_to_read_from_test', '--invalidatedTopicName=projects/test_project_id/topics/test_invalidated_topic_name', '--validatedTopicName=projects/test_project_id/topics/test_validated_topic_name', '--metricsReporterType=test_reporterType', '--metricsReporterPort=9125', '--metricsEnabled=true', '--update=false' ], formatted_param_list)
def setUp(self): logging.disable(logging.CRITICAL) self.parser = FlowConfigParser() self.test_file_name = get_absolute_path("_testing/test_conf.conf")
def test_project_with_no_version(self): with self.assertRaises(PomParseError): file = "_testing/pom_with_no_version.xml" self.assertEqual(parse_pom(get_absolute_path(file)), ('pom_artifact', ''))
def test_project_with_parent_version(self): file = "_testing/pom_with_parent_version.xml" self.assertEqual(parse_pom(get_absolute_path(file)), ('pom_artifact', '1.0.3-SNAPSHOT'))
def setUp(self): self.config_file_name = get_absolute_path("_testing/test_conf.conf")
def test_project_with_no_version(self): self.assertEqual( parse_pom(get_absolute_path("_testing/pom_with_no_version.xml")), ('pom_artifact', ''))