From 31a3e3f7acfa0c7af7cc6cce5517eb16c7bb79ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20R=2E=20Miguel?= Date: Thu, 9 Nov 2023 00:29:42 -0300 Subject: [PATCH] Clean up prepended psql error messages --- cli/src/commands/regress.rs | 9 ++------- cli/src/main.rs | 6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/cli/src/commands/regress.rs b/cli/src/commands/regress.rs index 31256fe2..6f81d224 100644 --- a/cli/src/commands/regress.rs +++ b/cli/src/commands/regress.rs @@ -18,7 +18,7 @@ use super::SubCommand; type Result = std::result::Result; #[derive(Args)] -pub struct TestCommand { +pub struct RegressCommand { /// The name of the extension to test extension_name: String, /// The psql connection string on which commands will be executed in @@ -27,12 +27,7 @@ pub struct TestCommand { #[derive(Deserialize, Debug)] struct TrunkProjectInfo { - pub name: String, - pub description: String, - pub documentation_link: String, pub repository_link: String, - pub version: String, - pub extensions: Vec, } #[derive(Debug, Deserialize)] @@ -125,7 +120,7 @@ async fn extract_sql_and_expected_files( } #[async_trait::async_trait] -impl SubCommand for TestCommand { +impl SubCommand for RegressCommand { async fn execute(&self, _: Task) -> Result<()> { let tempdir = TempDir::new()?; // Given an extension name, let's fetch its Trunk project diff --git a/cli/src/main.rs b/cli/src/main.rs index 01a6983e..7281b6f4 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -34,8 +34,8 @@ enum SubCommands { Publish(commands::publish::PublishCommand), /// Install a Postgres extension from the Trunk registry Install(commands::install::InstallCommand), - /// Test a Postgres extension (coming soon) - Test(commands::test::TestCommand), + /// Test a Postgres extension with its regression tests + Regress(commands::regress::RegressCommand), } #[async_trait] @@ -45,7 +45,7 @@ impl SubCommand for SubCommands { SubCommands::Build(cmd) => cmd.execute(task).await, SubCommands::Publish(cmd) => cmd.execute(task).await, SubCommands::Install(cmd) => cmd.execute(task).await, - SubCommands::Test(cmd) => cmd.execute(task).await, + SubCommands::Regress(cmd) => cmd.execute(task).await, } } }