You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/03/08 16:07:56 UTC

[GitHub] [beam] tysonjh commented on a change in pull request #14162: [BEAM-11932] Add Dataflow ServiceOptions

tysonjh commented on a change in pull request #14162:
URL: https://github.com/apache/beam/pull/14162#discussion_r589543640



##########
File path: sdks/python/apache_beam/options/pipeline_options_test.py
##########
@@ -623,6 +623,17 @@ def test_transform_name_mapping(self):
     mapping = options.view_as(GoogleCloudOptions).transform_name_mapping
     self.assertEqual(mapping['from'], 'to')
 
+  def test_service_options(self):
+    options = PipelineOptions(['--service_option', 'whizz=bang', '--service_option', 'beep=boop'])
+    self.assertEqual(
+        sorted(options.get_all_options()['service_options']), ['beep=boop', 'whizz=bang'])
+
+    options = PipelineOptions(['--service_options', 'whizz=bang', '--service_options', 'beep=boop'])
+    self.assertEqual(
+        sorted(options.get_all_options()['service_options']), ['beep=boop', 'whizz=bang'])

Review comment:
       `sorted(options.get_all_options()['service_options']), ['beep=boop', 'whizz=bang'])` is the same. The `PipelineOptions` are configured once using repeated `service_option` (i.e. singular) flags, and once using `service_options` (i.e. plural).
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org