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:33 UTC

[14/20] libcloud git commit: add tests for cloudwatt

add tests for cloudwatt


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/671bab93
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/671bab93
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/671bab93

Branch: refs/heads/trunk
Commit: 671bab93fa19c931773306e890c44337b7cea8cb
Parents: 36ee4ef
Author: Anthony Shaw <an...@apache.org>
Authored: Fri May 5 20:30:09 2017 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Fri May 5 20:30:09 2017 +1000

----------------------------------------------------------------------
 .../compute/fixtures/openstack/_v2_0__auth.json |  8 +++++
 libcloud/test/compute/test_cloudwatt.py         | 32 ++++++++++++++++++++
 2 files changed, 40 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/671bab93/libcloud/test/compute/fixtures/openstack/_v2_0__auth.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/openstack/_v2_0__auth.json b/libcloud/test/compute/fixtures/openstack/_v2_0__auth.json
index 3adb2cd..9cbf93b 100644
--- a/libcloud/test/compute/fixtures/openstack/_v2_0__auth.json
+++ b/libcloud/test/compute/fixtures/openstack/_v2_0__auth.json
@@ -63,6 +63,14 @@
                         "versionInfo": "https://test_endpoint.com/v2/",
                         "versionList": "https://test_endpoint.com/",
                         "versionId": "2"
+                    },
+                    {
+                        "region": "fr1",
+                        "tenantId": "1337",
+                        "publicURL": "https://test_endpoint.com/v2/1337",
+                        "versionInfo": "https://test_endpoint.com/v2/",
+                        "versionList": "https://test_endpoint.com/",
+                        "versionId": "2"
                     }
                 ],
                 "name": "nova",

http://git-wip-us.apache.org/repos/asf/libcloud/blob/671bab93/libcloud/test/compute/test_cloudwatt.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_cloudwatt.py b/libcloud/test/compute/test_cloudwatt.py
new file mode 100644
index 0000000..cc98abb
--- /dev/null
+++ b/libcloud/test/compute/test_cloudwatt.py
@@ -0,0 +1,32 @@
+# 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.compute.drivers.cloudwatt import CloudwattNodeDriver
+from libcloud.test.compute.test_openstack import OpenStack_1_1_Tests
+
+
+class CloudwattNodeDriverTests(OpenStack_1_1_Tests, unittest.TestCase):
+    driver_klass = CloudwattNodeDriver
+    driver_type = CloudwattNodeDriver
+
+    # These tests dont work because cloudwatt doesn't pass,
+    # auth tokens- hide them from the base class
+    def test_ex_force_auth_token_passed_to_connection(self):
+        pass
+
+    def test_auth_token_without_base_url_raises_exception(self):
+        pass