Skip to content

Commit

Permalink
Fixed tests for the "start" shell command
Browse files Browse the repository at this point in the history
Fixes #91
  • Loading branch information
tcalmant committed Mar 15, 2018
1 parent 97bed2b commit 6bda52c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tests/shell/test_core.py
Expand Up @@ -696,7 +696,7 @@ def testBundlesCommands(self):
Tests the install, start, update, stop and uninstall commands
"""
# Install a bundle
output = self._run_command('install pelix.ipopo.core')
output = self._run_command('install pelix.http.basic')

# Find it
bundle = self.context.get_bundles()[-1]
Expand Down Expand Up @@ -725,13 +725,29 @@ def testBundlesCommands(self):
self.assertNotIn(bundle, self.context.get_bundles())

# Test invalid command arguments
for command in ('start', 'update', 'stop', 'uninstall'):
for command in ('update', 'stop', 'uninstall'):
output = self._run_command('{0} aaa', command)
self.assertIn("Invalid bundle ID", output)

output = self._run_command('{0} {1}', command, -1)
self.assertIn("Unknown bundle", output)

def testBundleNameStart(self):
"""
Tests the bundle start feature with
:return:
"""
# Install a bundle
output = self._run_command('start pelix.http.basic')

# Find it and check its state
bundle = self.context.get_bundles()[-1]
self.assertEqual(bundle.get_state(), Bundle.ACTIVE)

# Check command output
bundle_id = bundle.get_bundle_id()
self.assertIn(str(bundle_id), output)

def testServicesInfo(self):
"""
Tests the sl and sd commands
Expand Down

0 comments on commit 6bda52c

Please sign in to comment.