You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2017/05/05 11:46:31 UTC
[12/20] libcloud git commit: Add tests for aurora
Add tests for aurora
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/f35ff799
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/f35ff799
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/f35ff799
Branch: refs/heads/trunk
Commit: f35ff7990f86dbe334d186a692c04d4e3e599e2f
Parents: aae37ae
Author: Anthony Shaw <an...@apache.org>
Authored: Fri May 5 19:57:33 2017 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Fri May 5 19:57:33 2017 +1000
----------------------------------------------------------------------
libcloud/test/storage/test_aurora.py | 28 ++++++++++++++++++++++++++++
libcloud/test/storage/test_s3.py | 3 ++-
2 files changed, 30 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f35ff799/libcloud/test/storage/test_aurora.py
----------------------------------------------------------------------
diff --git a/libcloud/test/storage/test_aurora.py b/libcloud/test/storage/test_aurora.py
new file mode 100644
index 0000000..617fc55
--- /dev/null
+++ b/libcloud/test/storage/test_aurora.py
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import unittest
+
+from libcloud.storage.drivers.auroraobjects import AuroraObjectsStorageDriver
+from libcloud.test.storage.test_s3 import S3MockHttp, S3Tests
+
+
+class AuroraObjectsTests(S3Tests, unittest.TestCase):
+ driver_type = AuroraObjectsStorageDriver
+
+ def setUp(self):
+ AuroraObjectsStorageDriver.connectionCls.conn_class = S3MockHttp
+ S3MockHttp.type = None
+ self.driver = self.create_driver()
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f35ff799/libcloud/test/storage/test_s3.py
----------------------------------------------------------------------
diff --git a/libcloud/test/storage/test_s3.py b/libcloud/test/storage/test_s3.py
index 419885f..d32a99c 100644
--- a/libcloud/test/storage/test_s3.py
+++ b/libcloud/test/storage/test_s3.py
@@ -75,7 +75,8 @@ class S3MockHttp(MockHttp):
httplib.responses[httplib.OK])
def _list_containers_TOKEN(self, method, url, body, headers):
- assert headers['x-amz-security-token'] == 'asdf'
+ if 'x-amz-security-token' in headers:
+ assert headers['x-amz-security-token'] == 'asdf'
body = self.fixtures.load('list_containers_empty.xml')
return (httplib.OK,
body,