Skip to content

Commit 298a855

Browse files
authored
Updating handwritten shim tests for ls -L flag. (GoogleCloudPlatform#1860)
1 parent b0a115c commit 298a855

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

gslib/tests/test_cp.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3385,11 +3385,7 @@ def test_nearline_applied_to_parallel_composite_upload(self):
33853385
]):
33863386
self.RunGsUtil(['cp', '-s', 'nearline', fpath, obj_suri])
33873387
stdout = self.RunGsUtil(['ls', '-L', obj_suri], return_stdout=True)
3388-
if self._use_gcloud_storage:
3389-
self.assertRegexpMatchesWithFlags(
3390-
stdout, r'Storage class: NEARLINE', flags=re.IGNORECASE)
3391-
else:
3392-
self.assertRegexpMatchesWithFlags(stdout,
3388+
self.assertRegexpMatchesWithFlags(stdout,
33933389
r'Storage class: NEARLINE',
33943390
flags=re.IGNORECASE)
33953391

gslib/tests/test_ls.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ def test_logging(self):
679679
stdout = self.RunGsUtil(['ls', '-lb', bucket_suri], return_stdout=True)
680680
self.assertNotIn('Logging configuration', stdout)
681681

682-
spacing = ' ' if self._use_gcloud_storage else '\t\t'
682+
spacing = '\t\t'
683683
# Logging configuration is absent by default
684684
stdout = self.RunGsUtil(['ls', '-Lb', bucket_suri], return_stdout=True)
685685
self.assertIn('Logging configuration:{}None'.format(spacing), stdout)
@@ -704,7 +704,7 @@ def test_web(self):
704704
stdout = self.RunGsUtil(['ls', '-lb', bucket_suri], return_stdout=True)
705705
self.assertNotIn('Website configuration', stdout)
706706

707-
spacing = ' ' if self._use_gcloud_storage else '\t\t'
707+
spacing = '\t\t'
708708
# Website configuration is absent by default
709709
stdout = self.RunGsUtil(['ls', '-Lb', bucket_suri], return_stdout=True)
710710
self.assertIn('Website configuration:{}None'.format(spacing), stdout)
@@ -726,7 +726,7 @@ def test_requesterpays(self):
726726
bucket_uri = self.CreateBucket()
727727
bucket_suri = suri(bucket_uri)
728728

729-
spacing = ' ' if self._use_gcloud_storage else '\t\t'
729+
spacing = '\t\t'
730730
# No requester pays configuration
731731
stdout = self.RunGsUtil(['ls', '-lb', bucket_suri], return_stdout=True)
732732
self.assertNotIn('Requester Pays enabled', stdout)

0 commit comments

Comments
 (0)