| Index: tools/telemetry/third_party/gsutilz/third_party/boto/tests/integration/glacier/test_layer2.py
|
| diff --git a/tools/telemetry/third_party/gsutilz/third_party/gcs-oauth2-boto-plugin/gcs_oauth2_boto_plugin/__init__.py b/tools/telemetry/third_party/gsutilz/third_party/boto/tests/integration/glacier/test_layer2.py
|
| similarity index 51%
|
| copy from tools/telemetry/third_party/gsutilz/third_party/gcs-oauth2-boto-plugin/gcs_oauth2_boto_plugin/__init__.py
|
| copy to tools/telemetry/third_party/gsutilz/third_party/boto/tests/integration/glacier/test_layer2.py
|
| index a70e6515e01f13e404e77ef814accaa5ba5c157e..caa44fa522beffac2a1e1cd0b5d03f222b0702f1 100644
|
| --- a/tools/telemetry/third_party/gsutilz/third_party/gcs-oauth2-boto-plugin/gcs_oauth2_boto_plugin/__init__.py
|
| +++ b/tools/telemetry/third_party/gsutilz/third_party/boto/tests/integration/glacier/test_layer2.py
|
| @@ -1,4 +1,4 @@
|
| -# Copyright 2014 Google Inc. All Rights Reserved.
|
| +# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
|
| #
|
| # Permission is hereby granted, free of charge, to any person obtaining a
|
| # copy of this software and associated documentation files (the
|
| @@ -18,13 +18,28 @@
|
| # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
| # IN THE SOFTWARE.
|
| +#
|
| +import time
|
| +from tests.unit import unittest
|
| +
|
| +from boto.glacier.layer2 import Layer1, Layer2
|
|
|
| -from __future__ import absolute_import
|
|
|
| -# Import this module so that users can simply import the top-level module. Once
|
| -# imported, boto will pick up our subclasses of AuthHandler.
|
| -from gcs_oauth2_boto_plugin import oauth2_plugin
|
| +class TestGlacierLayer2(unittest.TestCase):
|
| + glacier = True
|
|
|
| -from gcs_oauth2_boto_plugin.oauth2_helper import SetFallbackClientIdAndSecret
|
| -from gcs_oauth2_boto_plugin.oauth2_helper import SetLock
|
| + def setUp(self):
|
| + self.layer2 = Layer2()
|
| + self.vault_name = 'testvault%s' % int(time.time())
|
|
|
| + def test_create_delete_vault(self):
|
| + vault = self.layer2.create_vault(self.vault_name)
|
| + retrieved_vault = self.layer2.get_vault(self.vault_name)
|
| + self.layer2.delete_vault(self.vault_name)
|
| + self.assertEqual(vault.name, retrieved_vault.name)
|
| + self.assertEqual(vault.arn, retrieved_vault.arn)
|
| + self.assertEqual(vault.creation_date, retrieved_vault.creation_date)
|
| + self.assertEqual(vault.last_inventory_date,
|
| + retrieved_vault.last_inventory_date)
|
| + self.assertEqual(vault.number_of_archives,
|
| + retrieved_vault.number_of_archives)
|
|
|