Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
|
||
[Credentials] | ||
gs_oauth2_refresh_token = 1/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
|
||
[GSUtil] |
30 changes: 30 additions & 0 deletions
30
net-misc/gsutil/files/gsutil-3.34-Fix-test-using-glob-with-ObjectToURI.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 1b2eccc8a3c8c70855973d9dcff46bb0c4f79345 Mon Sep 17 00:00:00 2001 | ||
From: Michael Marineau <mike@marineau.org> | ||
Date: Mon, 12 Aug 2013 17:42:39 -0400 | ||
Subject: [PATCH] Fix test using ? glob with ObjectToURI | ||
|
||
Passing a ? wildcard through ObjectToURI does not work because passing | ||
the constructed URI through urlparse.urlparse() interprets ? as a query | ||
and strips it off since there is no query string following it. The * | ||
glob which is actually used in the very next call doesn't have that | ||
problem so just use that instead. | ||
--- | ||
gslib/tests/test_naming.py | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/gslib/tests/test_naming.py b/gslib/tests/test_naming.py | ||
index b4d0ccd..8208238 100755 | ||
--- a/gslib/tests/test_naming.py | ||
+++ b/gslib/tests/test_naming.py | ||
@@ -840,7 +840,7 @@ class GsutilNamingTests(testcase.GsUtilUnitTestCase): | ||
for i, final_dst_char in enumerate(('', '/')): | ||
# Copy some files into place in dst bucket. | ||
self.RunCommand( | ||
- 'cp', [suri(src_bucket_uri, 'f%df?' % i), | ||
+ 'cp', [suri(src_bucket_uri, 'f%df*' % i), | ||
suri(dst_bucket_uri, 'dst_subdir%d' % i) + final_dst_char]) | ||
# Now do the move test. | ||
self.RunCommand( | ||
-- | ||
1.8.1.5 | ||
|
45 changes: 45 additions & 0 deletions
45
net-misc/gsutil/files/gsutil-3.34-Fix-update-tests-that-fail-for-package-installs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From a978811458f3d0c5379101bdda4396c62b8b0d6b Mon Sep 17 00:00:00 2001 | ||
From: Michael Marineau <mike@marineau.org> | ||
Date: Mon, 12 Aug 2013 16:46:25 -0400 | ||
Subject: [PATCH] Fix update tests that fail for package installs. | ||
|
||
Software updates are checked for but never offered in package installs. | ||
Perhaps _MaybeCheckForAndOfferSoftwareUpdate should be split into two | ||
functions so the "check for" and "offer" parts can be tested | ||
independently but this fixes the tests as-is. | ||
--- | ||
gslib/tests/test_command_runner.py | 9 ++++++--- | ||
1 file changed, 6 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/gslib/tests/test_command_runner.py b/gslib/tests/test_command_runner.py | ||
index 01b5312..0a9eb01 100644 | ||
--- a/gslib/tests/test_command_runner.py | ||
+++ b/gslib/tests/test_command_runner.py | ||
@@ -105,8 +105,10 @@ class TestSoftwareUpdateCheckUnitTests( | ||
self._SetBotoConfig('GSUtil', 'software_update_check_period', '1') | ||
with open(self.timestamp_file, 'w') as f: | ||
f.write(str(int(time.time() - 2 * SECONDS_PER_DAY))) | ||
+ # Update will not trigger for package installs. | ||
+ expect = not gslib.IS_PACKAGE_INSTALL | ||
self.assertEqual( | ||
- True, | ||
+ expect, | ||
self.command_runner._MaybeCheckForAndOfferSoftwareUpdate('ls', 0)) | ||
|
||
def test_not_time_for_update_yet(self): | ||
@@ -134,9 +136,10 @@ class TestSoftwareUpdateCheckUnitTests( | ||
with open(self.timestamp_file, 'w') as f: | ||
f.write(str(int(time.time() - 2 * SECONDS_PER_DAY))) | ||
|
||
- # With regular loglevel, should return True. | ||
+ # With regular loglevel, should return True except for package installs. | ||
+ expect = not gslib.IS_PACKAGE_INSTALL | ||
self.assertEqual( | ||
- True, | ||
+ expect, | ||
self.command_runner._MaybeCheckForAndOfferSoftwareUpdate('ls', 0)) | ||
|
||
prev_loglevel = logging.getLogger().getEffectiveLevel() | ||
-- | ||
1.8.1.5 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters