Do not allow underscores in names
This commit is contained in:
parent
9f1d08c54b
commit
6c551a200b
2 changed files with 6 additions and 6 deletions
|
|
@ -10,13 +10,13 @@ class ServiceTest(DockerClientTestCase):
|
|||
self.assertRaises(ValueError, lambda: Service(name='/'))
|
||||
self.assertRaises(ValueError, lambda: Service(name='!'))
|
||||
self.assertRaises(ValueError, lambda: Service(name='\xe2'))
|
||||
self.assertRaises(ValueError, lambda: Service(name='_'))
|
||||
self.assertRaises(ValueError, lambda: Service(name='____'))
|
||||
self.assertRaises(ValueError, lambda: Service(name='foo_bar'))
|
||||
self.assertRaises(ValueError, lambda: Service(name='__foo_bar__'))
|
||||
|
||||
Service('a')
|
||||
Service('foo')
|
||||
Service('foo_bar')
|
||||
Service('__foo_bar__')
|
||||
Service('_')
|
||||
Service('_____')
|
||||
|
||||
def test_containers(self):
|
||||
foo = self.create_service('foo')
|
||||
|
|
@ -38,7 +38,7 @@ class ServiceTest(DockerClientTestCase):
|
|||
self.assertIn('/bar_2', names)
|
||||
|
||||
def test_up_scale_down(self):
|
||||
service = self.create_service('scaling_test')
|
||||
service = self.create_service('scalingtest')
|
||||
self.assertEqual(len(service.containers()), 0)
|
||||
|
||||
service.start()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue