Fixed event emitter for unknown object types.
- Added a boolean property to the test config. - Updated config integration tests.
This commit is contained in:
@@ -87,10 +87,8 @@ def print_handler(event):
|
||||
print(event.error(), file=sys.stderr)
|
||||
|
||||
else:
|
||||
logger.error(
|
||||
'Unable to print event. Type not supported: %s, %r.',
|
||||
type(event),
|
||||
event)
|
||||
logger.debug('Printing unknown type: %s, %r.', type(event), event)
|
||||
print(event)
|
||||
|
||||
|
||||
DEFAULT_HANDLER = print_handler
|
||||
|
@@ -55,7 +55,8 @@ def test_list_property(env):
|
||||
env)
|
||||
|
||||
assert returncode == 0
|
||||
assert stdout == b"""marathon.host=localhost
|
||||
assert stdout == b"""foo.bar=True
|
||||
marathon.host=localhost
|
||||
marathon.port=8080
|
||||
package.cache=tmp/cache
|
||||
package.sources=['git://github.com/mesosphere/universe.git', \
|
||||
@@ -64,10 +65,18 @@ package.sources=['git://github.com/mesosphere/universe.git', \
|
||||
assert stderr == b''
|
||||
|
||||
|
||||
def test_get_existing_property(env):
|
||||
def test_get_existing_string_property(env):
|
||||
_get_value('marathon.host', 'localhost', env)
|
||||
|
||||
|
||||
def test_get_existing_integral_property(env):
|
||||
_get_value('marathon.port', 8080, env)
|
||||
|
||||
|
||||
def test_get_existing_boolean_property(env):
|
||||
_get_value('foo.bar', True, env)
|
||||
|
||||
|
||||
def test_get_missing_property(env):
|
||||
_get_missing_value('missing.property', env)
|
||||
|
||||
|
@@ -1,6 +1,8 @@
|
||||
[package]
|
||||
sources = [ "git://github.com/mesosphere/universe.git", "https://github.com/mesosphere/universe/archive/master.zip",]
|
||||
cache = "tmp/cache"
|
||||
[foo]
|
||||
bar = true
|
||||
[marathon]
|
||||
host = "localhost"
|
||||
port = 8080
|
||||
[package]
|
||||
sources = [ "git://github.com/mesosphere/universe.git", "https://github.com/mesosphere/universe/archive/master.zip",]
|
||||
cache = "tmp/cache"
|
||||
|
Reference in New Issue
Block a user