derrickaw commented on code in PR #37260:
URL: https://github.com/apache/beam/pull/37260#discussion_r2677957253


##########
sdks/python/apache_beam/yaml/yaml_transform_unit_test.py:
##########
@@ -1099,6 +1099,33 @@ def 
test_expand_pipeline_with_incorrect_pipelines_key_fails(self):
       with self.assertRaises(KeyError):
         expand_pipeline(p, spec, validate_schema=None)
 
+  def test_expand_pipeline_with_valid_schema(self):
+    spec = '''
+      pipeline:
+        type: chain
+        transforms:
+          - type: Create
+            config:
+              elements: [1,2,3]
+          - type: LogForTesting
+    '''
+    with new_pipeline() as p:
+      expand_pipeline(p, spec, validate_schema='generic')
+
+  def test_expand_pipeline_with_invalid_schema(self):
+    spec = '''
+      pipeline:
+        type: chain
+        transforms:
+          - name: Create
+            config:
+              elements: [1,2,3]
+          - type: LogForTesting
+    '''
+    with new_pipeline() as p:
+      with self.assertRaises(jsonschema.ValidationError):
+        expand_pipeline(p, spec, validate_schema='generic')

Review Comment:
   done, thanks



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to