Skip to content

Commit

Permalink
Partially revert kubeflow_dag_runner_test to be backward compatible
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 274064819
  • Loading branch information
ucdmkt authored and tensorflow-extended-team committed Oct 10, 2019
1 parent c99975c commit ea85bfe
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions tfx/orchestration/kubeflow/kubeflow_dag_runner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,20 +172,27 @@ def testVolumeMountingPipelineOperatorFuncs(self):
]
self.assertEqual(2, len(container_templates))

volumes = [{
'name': 'my-volume-name',
'persistentVolumeClaim': {
'claimName': 'my-persistent-volume-claim'
}
}]

# Check that the PVC is specified for kfp<=0.1.31.1.
if 'volumes' in pipeline['spec']:
self.assertEqual(volumes, pipeline['spec']['volumes'])

for template in container_templates:
# Check that each container has the volume mounted.
self.assertEqual([{
'name': 'my-volume-name',
'mountPath': '/mnt/volume-mount-path'
}], template['container']['volumeMounts'])

# Check that each template has the PVC specified.
self.assertEqual([{
'name': 'my-volume-name',
'persistentVolumeClaim': {
'claimName': 'my-persistent-volume-claim'
}
}], template['volumes'])
# Check that each template has the PVC specified for kfp>=0.1.31.2.
if 'volumes' in template:
self.assertEqual(volumes, template['volumes'])


if __name__ == '__main__':
Expand Down

0 comments on commit ea85bfe

Please sign in to comment.