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)
|
print(event.error(), file=sys.stderr)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
logger.error(
|
logger.debug('Printing unknown type: %s, %r.', type(event), event)
|
||||||
'Unable to print event. Type not supported: %s, %r.',
|
print(event)
|
||||||
type(event),
|
|
||||||
event)
|
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_HANDLER = print_handler
|
DEFAULT_HANDLER = print_handler
|
||||||
|
@@ -55,7 +55,8 @@ def test_list_property(env):
|
|||||||
env)
|
env)
|
||||||
|
|
||||||
assert returncode == 0
|
assert returncode == 0
|
||||||
assert stdout == b"""marathon.host=localhost
|
assert stdout == b"""foo.bar=True
|
||||||
|
marathon.host=localhost
|
||||||
marathon.port=8080
|
marathon.port=8080
|
||||||
package.cache=tmp/cache
|
package.cache=tmp/cache
|
||||||
package.sources=['git://github.com/mesosphere/universe.git', \
|
package.sources=['git://github.com/mesosphere/universe.git', \
|
||||||
@@ -64,10 +65,18 @@ package.sources=['git://github.com/mesosphere/universe.git', \
|
|||||||
assert stderr == b''
|
assert stderr == b''
|
||||||
|
|
||||||
|
|
||||||
def test_get_existing_property(env):
|
def test_get_existing_string_property(env):
|
||||||
_get_value('marathon.host', 'localhost', 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):
|
def test_get_missing_property(env):
|
||||||
_get_missing_value('missing.property', env)
|
_get_missing_value('missing.property', env)
|
||||||
|
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
[package]
|
[foo]
|
||||||
sources = [ "git://github.com/mesosphere/universe.git", "https://github.com/mesosphere/universe/archive/master.zip",]
|
bar = true
|
||||||
cache = "tmp/cache"
|
|
||||||
[marathon]
|
[marathon]
|
||||||
host = "localhost"
|
host = "localhost"
|
||||||
port = 8080
|
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