docstr: End-to-End test for container components.
docstr_tok: ["End-to-End","test","for","container","components","."]
code: def testCreateContainerComponentEnd2EndPipeline(self):
      """End-to-End test for container components."""
      pipeline_name = "kubeflow-container-e2e-test-{}".format(
          test_utils.random_id()
      )
      text_url = "https://storage.googleapis.com/ml-pipeline-playground/hamlet.txt"
      pattern = "art thou"
      component_instances = download_grep_print_pipeline.create_pipeline_component_instances(
          text_url=text_url,
          pattern=pattern,
      )
      # Test that the pipeline can be executed successfully.
      pipeline = self._create_pipeline(
          pipeline_name, component_instances
      )
      self._compile_and_run_pipeline(
          pipeline=pipeline, workflow_name=pipeline_name
      )
      # Test if the correct value has been passed.
      artifacts = self._get_artifacts_with_type_and_pipeline(
          type_name="ExternalArtifact", pipeline_name=pipeline_name
      )
      # There should be exactly two artifacts.
      self.assertEqual(len(artifacts), 2)
      for artifact in artifacts:
          # TODO(b/150515270) Remove the '/data' suffix when b/150515270 is fixed.
          artifact_value = fileio.open(
              artifact.uri + "/data", "r"
          ).read()
          self.assertGreater(len(artifact_value), 100)
  
imports: import os
  import subprocess
  import time
  from typing import List
  from absl import logging
  from grpc import insecure_channel
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.orchestration import test_utils
  from tfx.orchestration.experimental.core.testing import test_dynamic_exec_properties_pipeline
  from tfx.orchestration.kubeflow import test_utils
  from tfx.orchestration.test_pipelines import download_grep_print_pipeline
  from tfx.types import standard_artifacts
  from ml_metadata.proto import metadata_store_pb2
  from ml_metadata.proto import metadata_store_service_pb2
  from ml_metadata.proto import metadata_store_service_pb2_grpc
label_desc: Use image node_id 12 for calling the KubeflowEndToEndTest obj's underlying member method code with example usage: obj.testCreateContainerComponentEnd2EndPipeline() without return types