@ResourceGroupPreparer(location=LINUX_ASP_LOCATION_WEBAPP)
def test_linux_webapp_ssh(self, resource_group):
    import platform
    if (platform.system() == 'Windows'):
        from azure.cli.core.util import CLIError
        with self.assertRaises(CLIError):
            self.cmd('webapp ssh -g {} -n {} --timeout 5'.format('foo', 'bar'))
        return
    runtime = 'node|12-lts'
    plan = self.create_random_name(prefix='webapp-ssh-plan', length=24)
    webapp = self.create_random_name(prefix='webapp-ssh', length=24)
    self.cmd('appservice plan create -g {} -n {} --sku S1 --is-linux'.format(resource_group, plan))
    self.cmd('webapp create -g {} -n {} --plan {} --runtime {}'.format(resource_group, webapp, plan, runtime))
    time.sleep(30)
    requests.get('http://{}.azurewebsites.net'.format(webapp), timeout=240)
    time.sleep(30)
    self.cmd('webapp ssh -g {} -n {} --timeout 5'.format(resource_group, webapp))
    time.sleep(30)
@ResourceGroupPreparer(location=LINUX_ASP_LOCATION_WEBAPP)
def test_linux_webapp_ssh(self, resource_group):
    import platform
    if (platform.system() == 'Windows'):
        from azure.cli.core.util import CLIError
        with self.assertRaises(CLIError):
            self.cmd('webapp ssh -g {} -n {} --timeout 5'.format('foo', 'bar'))
        return
    runtime = 'node|12-lts'
    plan = self.create_random_name(prefix='webapp-ssh-plan', length=24)
    webapp = self.create_random_name(prefix='webapp-ssh', length=24)
    self.cmd('appservice plan create -g {} -n {} --sku S1 --is-linux'.format(resource_group, plan))
    self.cmd('webapp create -g {} -n {} --plan {} --runtime {}'.format(resource_group, webapp, plan, runtime))
    time.sleep(30)
    requests.get('http://{}.azurewebsites.net'.format(webapp), timeout=240)
    time.sleep(30)
    self.cmd('webapp ssh -g {} -n {} --timeout 5'.format(resource_group, webapp))
    time.sleep(30)