Add isolated Stimmatelier Qwen speech studio and restore recipe
This commit is contained in:
1 parent
182c8a1e8f
commit
2664ea8bd8
21 files changed
+397
-14
No files matched your search
@@ -335,6 +335,16 @@ class ContainerTests(unittest.TestCase):
|
||||
for change in (lambda x:x.update(name='other-ui'),lambda x:x['mounts'][0].update(deck_path='models'),lambda x:x['mounts'][0].update(deck_path='video/original-work'),lambda x:x['mounts'][0].update(target='/data/outputs')):
|
||||
bad=copy.deepcopy(c);change(bad)
|
||||
with self.assertRaises(ValueError):validate_container(bad)
|
||||
def test_stimmatelier_restore_recreates_isolated_socket_directory(self):
|
||||
c=self.config();c.update(name='athena-stimmatelier',image='athena-stimmatelier:0.1.0',registry=None,network='none',ports={},build_recipe='stimmatelier',running=False,mounts=[dict(index=0,target='/data',deck_path='stimmatelier-ui',read_only=False,was_file=False,files={})])
|
||||
validate_container(c)
|
||||
bad=copy.deepcopy(c);bad['mounts'][0]['deck_path']='speech-voices'
|
||||
with self.assertRaises(ValueError):validate_container(bad)
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
root=Path(d);(root/'backup-policy.json').write_text(json.dumps({'deck_state':d}));calls=[]
|
||||
with patch('deploy.docker_backup.subprocess.run',return_value=Mock(returncode=1)),patch('deploy.docker_backup.command',side_effect=lambda args,*extra,**kw:calls.append(args) or ''),patch('deploy.docker_backup.Path.stat',return_value=Mock(st_uid=0,st_mode=0o100600)),patch('deploy.docker_backup.os.chown'):
|
||||
result=restore_container(Mock(state=root),c)
|
||||
self.assertEqual(result['state'],'complete');create=next(x for x in calls if x[0]=='create');self.assertIn('--read-only',create);self.assertEqual(create[create.index('--network')+1],'none');self.assertTrue((root/'stimmatelier-ui').is_dir())
|
||||
def test_ladypoly_recipe_and_config_are_scoped(self):
|
||||
c=self.config();c.update(name='athena-ladypoly',image='athena-ladypoly:3960afc-deck1',registry=None,network='host',build_recipe='ladypoly',mounts=[dict(index=0,target='/data',deck_path=None,read_only=False,was_file=False,files={'deck-connection.json':'e30='})]);validate_container(c)
|
||||
for change in (lambda x:x.update(name='other-ui'),lambda x:x.update(image='untrusted:1'),lambda x:x['mounts'][0].update(target='/other')):
|
||||
|
||||
Reference in new issue
Block a user