merge from trunk
This commit is contained in:
commit
3981224d3f
@ -9,6 +9,8 @@
|
|||||||
- fix 'make test' in python 2.6
|
- fix 'make test' in python 2.6
|
||||||
- support jinja2 as a templating engine. Drop the hard requirement on
|
- support jinja2 as a templating engine. Drop the hard requirement on
|
||||||
cheetah. This helps in python3 effort. (LP: #1219223)
|
cheetah. This helps in python3 effort. (LP: #1219223)
|
||||||
|
- change install path for systemd files to /lib/systemd/system
|
||||||
|
[Dimitri John Ledkov]
|
||||||
0.7.5:
|
0.7.5:
|
||||||
- open 0.7.5
|
- open 0.7.5
|
||||||
- Add a debug log message around import failures
|
- Add a debug log message around import failures
|
||||||
|
@ -39,7 +39,7 @@ PKG_MP = {
|
|||||||
'pyyaml': 'python-yaml',
|
'pyyaml': 'python-yaml',
|
||||||
'requests': 'python-requests',
|
'requests': 'python-requests',
|
||||||
}
|
}
|
||||||
DEBUILD_ARGS = ["-us", "-S", "-uc", "-d"]
|
DEBUILD_ARGS = ["-S", "-d"]
|
||||||
|
|
||||||
|
|
||||||
def write_debian_folder(root, version, revno, append_requires=[]):
|
def write_debian_folder(root, version, revno, append_requires=[]):
|
||||||
@ -105,10 +105,17 @@ def main():
|
|||||||
|
|
||||||
for ent in DEBUILD_ARGS:
|
for ent in DEBUILD_ARGS:
|
||||||
parser.add_argument(ent, dest="debuild_args", action='append_const',
|
parser.add_argument(ent, dest="debuild_args", action='append_const',
|
||||||
const=ent, help=("pass through '%s' to debuild" % ent))
|
const=ent, help=("pass through '%s' to debuild" % ent),
|
||||||
|
default=[])
|
||||||
|
|
||||||
|
parser.add_argument("--sign", default=False, action='store_true',
|
||||||
|
help="sign result. do not pass -us -uc to debuild")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
if not args.sign:
|
||||||
|
args.debuild_args.extend(['-us', '-uc'])
|
||||||
|
|
||||||
os.environ['INIT_SYSTEM'] = args.init_system
|
os.environ['INIT_SYSTEM'] = args.init_system
|
||||||
|
|
||||||
capture = True
|
capture = True
|
||||||
@ -168,7 +175,8 @@ def main():
|
|||||||
print("Copied that archive to %r for local usage (if desired)." %
|
print("Copied that archive to %r for local usage (if desired)." %
|
||||||
(util.abs_join(os.getcwd(), tar_fn)))
|
(util.abs_join(os.getcwd(), tar_fn)))
|
||||||
|
|
||||||
print("Running 'debuild' in %r" % (xdir))
|
print("Running 'debuild %s' in %r" % (' '.join(args.debuild_args),
|
||||||
|
xdir))
|
||||||
with util.chdir(xdir):
|
with util.chdir(xdir):
|
||||||
cmd = ['debuild', '--preserve-envvar', 'INIT_SYSTEM']
|
cmd = ['debuild', '--preserve-envvar', 'INIT_SYSTEM']
|
||||||
if args.debuild_args:
|
if args.debuild_args:
|
||||||
|
@ -233,6 +233,21 @@ class FilesystemMockingTestCase(ResourceUsingTestCase):
|
|||||||
self.patched_funcs.append((mod, f, func))
|
self.patched_funcs.append((mod, f, func))
|
||||||
|
|
||||||
|
|
||||||
|
class HttprettyTestCase(TestCase):
|
||||||
|
# necessary as http_proxy gets in the way of httpretty
|
||||||
|
# https://github.com/gabrielfalcao/HTTPretty/issues/122
|
||||||
|
def setUp(self):
|
||||||
|
self.restore_proxy = os.environ.get('http_proxy')
|
||||||
|
if self.restore_proxy is not None:
|
||||||
|
del os.environ['http_proxy']
|
||||||
|
super(HttprettyTestCase, self).setUp()
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
if self.restore_proxy:
|
||||||
|
os.environ['http_proxy'] = self.restore_proxy
|
||||||
|
super(HttprettyTestCase, self).tearDown()
|
||||||
|
|
||||||
|
|
||||||
def populate_dir(path, files):
|
def populate_dir(path, files):
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
|
@ -55,12 +55,13 @@ def _request_callback(method, uri, headers):
|
|||||||
return (404, headers, '')
|
return (404, headers, '')
|
||||||
|
|
||||||
|
|
||||||
class TestDataSourceGCE(test_helpers.TestCase):
|
class TestDataSourceGCE(test_helpers.HttprettyTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ds = DataSourceGCE.DataSourceGCE(
|
self.ds = DataSourceGCE.DataSourceGCE(
|
||||||
settings.CFG_BUILTIN, None,
|
settings.CFG_BUILTIN, None,
|
||||||
helpers.Paths({}))
|
helpers.Paths({}))
|
||||||
|
super(TestDataSourceGCE, self).setUp()
|
||||||
|
|
||||||
@httpretty.activate
|
@httpretty.activate
|
||||||
def test_connection(self):
|
def test_connection(self):
|
||||||
|
@ -121,7 +121,7 @@ def _register_uris(version, ec2_files, ec2_meta, os_files):
|
|||||||
body=get_request_callback)
|
body=get_request_callback)
|
||||||
|
|
||||||
|
|
||||||
class TestOpenStackDataSource(test_helpers.TestCase):
|
class TestOpenStackDataSource(test_helpers.HttprettyTestCase):
|
||||||
VERSION = 'latest'
|
VERSION = 'latest'
|
||||||
|
|
||||||
@hp.activate
|
@hp.activate
|
||||||
|
@ -6,7 +6,7 @@ from cloudinit import url_helper as uh
|
|||||||
import httpretty as hp
|
import httpretty as hp
|
||||||
|
|
||||||
|
|
||||||
class TestEc2Util(helpers.TestCase):
|
class TestEc2Util(helpers.HttprettyTestCase):
|
||||||
VERSION = 'latest'
|
VERSION = 'latest'
|
||||||
|
|
||||||
@hp.activate
|
@hp.activate
|
||||||
|
Loading…
Reference in New Issue
Block a user