From 325a68e596ed3492db7c59ea85a3f5b657312838 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 11 Jul 2023 12:00:55 -0400 Subject: [PATCH] chore(shorebird_cli): add delete app to end of integration test (#813) Co-authored-by: Felix Angelov --- .../shorebird_cli_integration_test.dart | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart b/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart index 787c497d..debad792 100644 --- a/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart +++ b/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart @@ -157,5 +157,35 @@ void main() { ), ), ); + + // Delete the app to clean up after ourselves. + final deleteAppResult = runCommand( + 'shorebird apps delete --app-id=${shorebirdYaml.appId} --force', + workingDirectory: cwd, + ); + expect(deleteAppResult.stderr, isEmpty); + expect(deleteAppResult.exitCode, equals(0)); + expect( + deleteAppResult.stdout, + contains('Deleted app: ${shorebirdYaml.appId}'), + ); + + // Verify that the app was deleted. + final deleteAppAppsListResult = runCommand( + 'shorebird apps list', + workingDirectory: cwd, + ); + expect(deleteAppAppsListResult.stderr, isEmpty); + expect(deleteAppAppsListResult.exitCode, equals(0)); + expect( + (deleteAppAppsListResult.stdout as String).split('\n'), + isNot( + anyElement( + matches( + '^.+$testAppName.+${shorebirdYaml.appId}.+\$', + ), + ), + ), + ); }); }