Port bootstrap script length limit

This commit is contained in:
Kovid Goyal
2023-02-24 08:16:53 +05:30
parent 9870c94007
commit e02ba7f389
3 changed files with 24 additions and 8 deletions

View File

@@ -56,12 +56,6 @@ print(' '.join(map(str, buf)))'''), lines=13, cols=77)
t('ssh --kitten=one -p 12 --kitten two -ix main', identity_file='x', port=12, extra_args=(('--kitten', 'one'), ('--kitten', 'two')))
self.assertTrue(runtime_dir())
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')
self.assertLessEqual(sum(len(x) for x in rcmd), 9000)
@property
@lru_cache()
def all_possible_sh(self):