fly-apps / fly-laravel

Run your Laravel apps on Fly
40 stars 3 forks source link

Create tests for Launch command #53

Closed KTanAug21 closed 11 months ago

KTanAug21 commented 1 year ago

This PR contains:

  1. Add feature tests for the Launch command. Contains tests for: a. Handling projects with existing fly.toml file: _- User declines deploy prompt - should exit, and not trigger deploy command

    • User accepts deploy prompt - should trigger deploy command_ b. Handling invalid app names by exiting with FAILURE c. Handling initialization of config files for simple/default user input for prompts, and exits successfully when deploy command declined
  2. Use DeployCommand::class result as the return value of command when user accepts prompt to deploy instead of launch when fly.toml exists

  3. Use "./" instead of ".fly" when copying files from template to base directory. This is done because when an existing ".fly" directory is available in the base directory, the copy creates a .fly directory inside the existing one