Split up the bootstrap script to keep its size down

This commit is contained in:
Kovid Goyal
2022-03-16 07:17:12 +05:30
parent 0fd7f3f7b5
commit 0a2768e496
4 changed files with 167 additions and 161 deletions

View File

@@ -79,9 +79,9 @@ print(' '.join(map(str, buf)))'''), lines=13, cols=77)
self.ae(parse(conf, '2').env, {'a': 'c', 'b': 'b'})
def test_ssh_bootstrap_sh_cmd_limit(self):
# dropbear has a 9000 bytes maximum command length limit
sh_script, _, _ = bootstrap_script(SSHOptions({'interpreter': 'sh'}), script_type='sh', remote_args=[], request_id='123-123')
rcmd = wrap_bootstrap_script(sh_script, 'sh')
# dropbear has a 9000 bytes maximum command length limit
self.assertLessEqual(sum(len(x) for x in rcmd), 9000)
@property