コード例 #1
0
 def test_remove_pipeline(self, openshift):
     p_run = PipelineRun(os=openshift, pipeline_run_name=PIPELINE_RUN_NAME)
     response_json = {'kind': 'Status',
                      'apiVersion': 'v1',
                      'metadata': {},
                      'status': 'Success',
                      'details': {'name': PIPELINE_RUN_NAME, 'group': 'tekton.dev',
                                  'kind': 'pipelineruns',
                                  'uid': '16a9ad64-89f1-4612-baec-ded3e8a6df26'}
                      }
     responses.add(
         responses.DELETE,
         f'https://openshift.testing/apis/tekton.dev/v1beta1/namespaces/'
         f'{TEST_OCP_NAMESPACE}/pipelineruns/{PIPELINE_RUN_NAME}',
         json=response_json
     )
     result_response = p_run.remove_pipeline_run()
     assert len(responses.calls) == 1
     assert result_response == response_json
コード例 #2
0
 def remove_build(self, build_name):
     pipeline_run = PipelineRun(self.os, build_name)
     return pipeline_run.remove_pipeline_run()