components/openstack/swift/patches/test.patch
author Danek Duvall <danek.duvall@oracle.com>
Thu, 19 Mar 2015 14:41:20 -0700
changeset 3998 5bd484384122
parent 2167 c9ff638a3018
child 5448 56f4540f741d
permissions -rw-r--r--
PSARC 2015/110 OpenStack service updates for Juno PSARC 2014/302 oslo.messaging - OpenStack RPC and notifications PSARC 2014/303 concurrent.futures - high-level Python interface for asynchronous execution PSARC 2014/304 networkx - Python module for complex networks PSARC 2014/305 taskflow - Python module for task execution PSARC 2014/329 pycadf - Python interface for CADF (cloud auditing) PSARC 2014/330 posix_ipc - POSIX IPC primitives for Python PSARC 2014/331 oauthlib - Python implementation of OAuth request-signing logic PSARC 2015/058 oslo - OpenStack common libraries (context, db, i18n, middleware, serialization, utils, vmware) PSARC 2015/059 glance_store - Glance storage library PSARC 2015/060 ipaddr - an IPv4/IPv6 manipulation library in Python PSARC 2015/061 simplegeneric - single-dispatch generic Python functions PSARC 2015/062 wsme - Web Services Made Easy PSARC 2015/063 retrying - General purpose Python retrying library PSARC 2015/065 osprofiler - an OpenStack cross-project profiling library PSARC 2015/066 OpenStack client for Sahara (Hadoop as a Service) PSARC 2015/067 keystonemiddleware - Middleware for OpenStack Identity PSARC 2015/068 pyScss - Compiler for the SCSS flavor of the Sass language PSARC 2015/069 django-pyscss - pyScss support for Django PSARC 2015/073 barbicanclient - OpenStack client for Barbican (Key Management) PSARC 2015/074 pysendfile - Python interface to sendfile PSARC 2015/097 ldappool - a connection pool for python-ldap PSARC 2015/098 rfc3986 - URI reference validation module for Python PSARC 2015/102 iniparse - python .ini file parsing module 20667775 OpenStack service updates for Juno (Umbrella) 18615101 Horizon should prevent network, subnet, and port names with hyphens in them 18772068 instance failed to launch with NoValidHost but no reason 18887457 openstack shouldn't deliver .po files 18905324 hostname.xml should set config/ignore_dhcp_hostname = true 18961031 Duplicate names for role-create and user-create are allowed 19015363 Users should not be allowed to attempt to create volumes when quota exceed 19050335 user appears logged in but unauthorised after horizon reboot 19144215 Instance manipulation buttons greyed out after all instances terminated 19249066 heat stack-preview doesn't appear to do anything 19313272 Need bottom slidebar in horizon for small browser windows 19462265 The Python module oslo.messaging should be added to Userland 19462397 The Python module futures should be added to Userland 19476604 The Python module networkx should be added to Userland 19476953 The Python module taskflow should be added to Userland 19519227 The Python module pycadf should be added to Userland 19582394 The Python module posix_ipc should be added to Userland 19598430 The Python module oauthlib should be added to Userland 19815780 nova package should have dependencies on brand-solaris and brand-solaris-kz 19883623 Image snapshots are missing 'instance_uuid' property 19887874 horizon should set up apache log rotation 19987962 Cinder lists additional volumes attached to instance with linuxy device names 20027791 horizon should be migrated to Apache 2.4 20164815 The Python module django-pyscss should be added to Userland 20173049 The Python module retrying should be added to Userland 20174489 The Python module WSME should be added to Userland 20176001 The Python module keystonemiddleware should be added to Userland 20182039 The Python module pysendfile should be added to Userland 20200162 The Python module pyScss should be added to Userland 20222184 horizon doesn't send start request on shutdown instance 20312312 The Python module python-saharaclient should be added to Userland 20514287 wrong vnic label name used for dhcp vnic in evs 20596802 The Python module oslo.middleware should be added to Userland 20596803 The Python module barbicanclient should be added to Userland 20596804 The Python module oslo.context should be added to Userland 20596805 The Python module iniparse should be added to Userland 20596806 The Python module oslo.vmware should be added to Userland 20596807 The Python module osprofiler should be added to Userland 20596808 The Python module oslo.i18n should be added to Userland 20596809 The Python module oslo.utils should be added to Userland 20596811 The Python module ipaddr should be added to Userland 20596812 The Python module glance_store should be added to Userland 20596813 The Python module oslo.serialization should be added to Userland 20596814 The Python module oslo.db should be added to Userland 20596815 The Python module simplegeneric should be added to Userland 20602690 The Python module ldappool should be added to Userland 20602722 The Python module rfc3986 should be added to Userland 20638369 compilemessages.py requires GNU msgfmt without calling gmsgfmt 20715741 cinder 2014.2.2 20715742 glance 2014.2.2 20715743 heat 2014.2.2 20715744 horizon 2014.2.2 20715745 keystone 2014.2.2 20715746 neutron 2014.2.2 20715747 nova 2014.2.2 20715748 swift 2.2.2 20715749 alembic 0.7.4 20715750 amqp 1.4.6 20715751 boto 2.34.0 20715752 ceilometerclient 1.0.12 20715753 cinderclient 1.1.1 20715754 cliff 1.9.0 20715756 django 1.4.19 20715757 django_compressor 1.4 20715758 django_openstack_auth 1.1.9 20715759 eventlet 0.15.2 20715761 glanceclient 0.15.0 20715762 greenlet 0.4.5 20715763 heatclient 0.2.12 20715764 keystoneclient 1.0.0 20715765 kombu 3.0.7 20715766 mysql 1.2.5 20715767 netaddr 0.7.13 20715769 netifaces 0.10.4 20715770 neutronclient 2.3.10 20715771 novaclient 2.20.0 20715772 oslo.config 1.6.0 20715773 py 1.4.26 20715774 pyflakes 0.8.1 20715775 pytest 2.6.4 20715776 pytz 2014.10 20715777 requests 2.6.0 20715778 simplejson 3.6.5 20715779 six 1.9.0 20715780 sqlalchemy-migrate 0.9.1 20715781 sqlalchemy 0.9.8 20715782 stevedore 1.2.0 20715783 swiftclient 2.3.1 20715784 tox 1.8.1 20715785 troveclient 1.0.8 20715786 virtualenv 12.0.7 20715787 websockify 0.6.0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1896
f83e6dde6c3b 18551677 Request to integrate Swift into userland
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     1
Various testing fixes:
f83e6dde6c3b 18551677 Request to integrate Swift into userland
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     2
f83e6dde6c3b 18551677 Request to integrate Swift into userland
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     3
  - Tests involving large (5GB+) bodies are mocked, but on 32-bit python,
f83e6dde6c3b 18551677 Request to integrate Swift into userland
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     4
    len() is limited to returning a ssize_t, which can represent 2GB.
f83e6dde6c3b 18551677 Request to integrate Swift into userland
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     5
f83e6dde6c3b 18551677 Request to integrate Swift into userland
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     6
  - Solaris doesn't yet support syslog logging to /dev/log.
f83e6dde6c3b 18551677 Request to integrate Swift into userland
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     7
2167
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
     8
  - Solaris exclusive file locks don't fail when applied multiple times
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
     9
    from a single process (it has to happen in a separate process).
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    10
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    11
  - Uncomment portions of test/sample.conf to match what we ship in
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    12
    /etc/swift/swift.conf, since the latter can't be read without
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    13
    sufficient privileges.  This allows us to set SWIFT_TEST_CONFIG_FILE
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    14
    and run the functional tests.
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    15
1944
56ac2df1785b PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents: 1896
diff changeset
    16
The first, while potentially useful elsewhere, is really only an issue on
56ac2df1785b PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents: 1896
diff changeset
    17
Solaris because Linux runs almost exclusively 64-bit, which makes this a
2167
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    18
non-issue.  The second is Solaris-only -- though clearly a similar problem
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    19
exists on MacOS -- and we will want to fix this in our Python.  The third
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    20
is not in a form that is worth sending upstream.  To test this properly,
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    21
the test should fork a separate process to test the lock, which should work
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    22
regardless of the OS.
1896
f83e6dde6c3b 18551677 Request to integrate Swift into userland
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    23
3998
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    24
--- swift-2.2.2/test/sample.conf.~1~	2015-02-01 23:44:11.000000000 -0800
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    25
+++ swift-2.2.2/test/sample.conf	2015-02-26 16:36:42.753470819 -0800
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    26
@@ -62,17 +62,17 @@ fake_syslog = False
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    27
 # Note that the cluster must have "sane" values for the test suite to pass
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    28
 # (for some definition of sane).
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    29
 #
2167
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    30
-#max_file_size = 5368709122
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    31
-#max_meta_name_length = 128
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    32
-#max_meta_value_length = 256
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    33
-#max_meta_count = 90
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    34
-#max_meta_overall_size = 4096
3998
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    35
-#max_header_size = 8192
2167
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    36
-#max_object_name_length = 1024
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    37
-#container_listing_limit = 10000
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    38
-#account_listing_limit = 10000
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    39
-#max_account_name_length = 256
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    40
-#max_container_name_length = 256
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    41
+max_file_size = 5368709122
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    42
+max_meta_name_length = 128
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    43
+max_meta_value_length = 256
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    44
+max_meta_count = 90
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    45
+max_meta_overall_size = 4096
3998
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    46
+max_header_size = 8192
2167
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    47
+max_object_name_length = 1024
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    48
+container_listing_limit = 10000
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    49
+account_listing_limit = 10000
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    50
+max_account_name_length = 256
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    51
+max_container_name_length = 256
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
    52
 
3998
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    53
 # Newer swift versions default to strict cors mode, but older ones were the
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    54
 # opposite.
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    55
--- swift-2.2.2/test/unit/__init__.py.~1~	2015-02-26 16:36:42.754399372 -0800
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    56
+++ swift-2.2.2/test/unit/__init__.py	2015-02-26 16:41:30.006380635 -0800
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    57
@@ -670,7 +670,7 @@ def fake_http_connect(*code_iter, **kwar
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    58
                     etag = '"68b329da9893e34099c7d8ad5cb9c940"'
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    59
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    60
             headers = swob.HeaderKeyDict({
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    61
-                'content-length': len(self.body),
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    62
+                'content-length': self.body.__len__(),
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    63
                 'content-type': 'x-application/test',
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    64
                 'x-timestamp': self.timestamp,
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    65
                 'x-backend-timestamp': self.timestamp,
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    66
--- swift-2.2.2/test/unit/common/test_utils.py.~1~	2015-02-01 23:44:11.000000000 -0800
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    67
+++ swift-2.2.2/test/unit/common/test_utils.py	2015-02-26 16:36:42.756657286 -0800
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    68
@@ -52,6 +52,7 @@ from functools import partial
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    69
 from tempfile import TemporaryFile, NamedTemporaryFile, mkdtemp
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    70
 from netifaces import AF_INET6
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    71
 from mock import MagicMock, patch
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    72
+from nose import SkipTest
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    73
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    74
 from swift.common.exceptions import (Timeout, MessageTimeout,
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    75
                                      ConnectionTimeout, LockTimeout,
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    76
@@ -733,6 +734,8 @@ class TestUtils(unittest.TestCase):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    77
         utils.HASH_PATH_PREFIX = 'startcap'
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    78
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    79
     def test_lock_path(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    80
+        if sys.platform == 'sunos5':
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    81
+            raise SkipTest
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    82
         tmpdir = mkdtemp()
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    83
         try:
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    84
             with utils.lock_path(tmpdir, 0.1):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    85
@@ -749,6 +752,8 @@ class TestUtils(unittest.TestCase):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    86
             shutil.rmtree(tmpdir)
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    87
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    88
     def test_lock_path_num_sleeps(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    89
+        if sys.platform == 'sunos5':
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    90
+            raise SkipTest
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    91
         tmpdir = mkdtemp()
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    92
         num_short_calls = [0]
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    93
         exception_raised = [False]
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    94
@@ -773,6 +778,8 @@ class TestUtils(unittest.TestCase):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    95
         self.assertTrue(exception_raised[0])
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    96
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    97
     def test_lock_path_class(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    98
+        if sys.platform == 'sunos5':
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
    99
+            raise SkipTest
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   100
         tmpdir = mkdtemp()
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   101
         try:
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   102
             with utils.lock_path(tmpdir, 0.1, ReplicationLockTimeout):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   103
@@ -1195,7 +1202,8 @@ class TestUtils(unittest.TestCase):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   104
             }, 'server', log_route='server')
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   105
             expected_args = [((), {'address': '/dev/log',
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   106
                                    'facility': orig_sysloghandler.LOG_LOCAL3})]
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   107
-            if not os.path.exists('/dev/log') or \
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   108
+            if sys.platform == 'sunos5' or \
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   109
+                    not os.path.exists('/dev/log') or \
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   110
                     os.path.isfile('/dev/log') or \
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   111
                     os.path.isdir('/dev/log'):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   112
                 # Since socket on OSX is in /var/run/syslog, there will be
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   113
@@ -2374,6 +2382,8 @@ cluster_dfw1 = http://dfw1.host/v1/
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   114
                 MagicMock(side_effect=BaseException('test3')))
2167
c9ff638a3018 19878891 problem in SERVICE/SWIFT
Danek Duvall <danek.duvall@oracle.com>
parents: 1944
diff changeset
   115
 
3998
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   116
     def test_lock_file(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   117
+        if sys.platform == 'sunos5':
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   118
+            raise SkipTest
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   119
         flags = os.O_CREAT | os.O_RDWR
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   120
         with NamedTemporaryFile(delete=False) as nt:
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   121
             nt.write("test string")
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   122
@@ -2452,6 +2462,8 @@ cluster_dfw1 = http://dfw1.host/v1/
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   123
                                         os.fstat(f.fileno()).st_ino)
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   124
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   125
     def test_lock_file_held_on_unlink(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   126
+        if sys.platform == 'sunos5':
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   127
+            raise SkipTest
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   128
         os_unlink = os.unlink
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   129
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   130
         def flocking_unlink(filename):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   131
@@ -2468,6 +2480,8 @@ cluster_dfw1 = http://dfw1.host/v1/
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   132
                     pass
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   133
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   134
     def test_lock_file_no_unlink_if_fail(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   135
+        if sys.platform == 'sunos5':
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   136
+            raise SkipTest
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   137
         os_open = os.open
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   138
         with NamedTemporaryFile(delete=True) as nt:
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   139
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   140
--- swift-2.2.2/test/unit/obj/test_diskfile.py.~1~	2015-02-01 23:44:11.000000000 -0800
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   141
+++ swift-2.2.2/test/unit/obj/test_diskfile.py	2015-02-26 16:36:42.757582696 -0800
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   142
@@ -18,6 +18,7 @@
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   143
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   144
 import cPickle as pickle
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   145
 import os
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   146
+import sys
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   147
 import errno
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   148
 import mock
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   149
 import unittest
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   150
@@ -902,6 +903,8 @@ class TestDiskFileManager(unittest.TestC
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   151
         self.assertEqual(hashes, {})
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   152
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   153
     def test_replication_lock_on(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   154
+        if sys.platform == 'sunos5':
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   155
+            raise SkipTest
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   156
         # Double check settings
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   157
         self.df_mgr.replication_one_per_device = True
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   158
         self.df_mgr.replication_lock_timeout = 0.1
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   159
--- swift-2.2.2/test/unit/proxy/test_server.py.~1~	2015-02-01 23:44:11.000000000 -0800
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   160
+++ swift-2.2.2/test/unit/proxy/test_server.py	2015-02-26 16:36:42.760354922 -0800
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   161
@@ -3376,6 +3376,9 @@ class TestObjectController(unittest.Test
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   162
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   163
         class LargeResponseBody(object):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   164
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   165
+            def __nonzero__(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   166
+                return True
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   167
+
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   168
             def __len__(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   169
                 return constraints.MAX_FILE_SIZE + 1
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   170
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   171
@@ -3620,6 +3623,9 @@ class TestObjectController(unittest.Test
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   172
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   173
         class LargeResponseBody(object):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   174
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   175
+            def __nonzero__(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   176
+                return True
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   177
+
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   178
             def __len__(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   179
                 return constraints.MAX_FILE_SIZE + 1
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   180
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   181
@@ -3644,6 +3650,9 @@ class TestObjectController(unittest.Test
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   182
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   183
         class LargeResponseBody(object):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   184
 
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   185
+            def __nonzero__(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   186
+                return True
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   187
+
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   188
             def __len__(self):
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   189
                 return constraints.MAX_FILE_SIZE + 1
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 2167
diff changeset
   190