Skip to content

Commit

Permalink
Fix. (#2077)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiaxiao Zheng authored and k8s-ci-robot committed Sep 10, 2019
1 parent bdb8598 commit 30b97dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/sample-test/sample_test_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ def _copy_result(self):
""" Copy generated sample test result to gcs, so that Prow can pick it. """
print('Copy the test results to GCS %s/' % self._results_gcs_dir)

utils.upload_blob(
self._bucket_name,
# TODO(Issue#2076): Currently switch to gsutil. Switch back to upload_blob
# when it is fixed.
subprocess.call([
'gsutil',
'cp',
self._sample_test_result,
os.path.join(self._results_gcs_dir, self._sample_test_result)
)
])

def _compile(self):

Expand Down
1 change: 1 addition & 0 deletions test/sample-test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def file_injection(file_in, tmp_file_out, subs):

os.rename(tmp_file_out, file_in)

# TODO(Issue#2076): Currently broken, further investigation needed.
def upload_blob(bucket_name, source_file_name, destination_blob_name):
"""Uploads a file to the bucket."""
storage_client = storage.Client()
Expand Down

0 comments on commit 30b97dd

Please sign in to comment.