From e33665d03fd15fb0bf86de2edd362732085a260f Mon Sep 17 00:00:00 2001 From: donoghuc Date: Wed, 19 Feb 2025 14:23:11 -0800 Subject: [PATCH] Fix acceptance test assertions for updated plugin `remove` This commit updates the acceptance tests to expect messages in the updated format for removing plugins. See https://github.com/elastic/logstash/pull/17030 for change. --- .../shared_examples/cli/logstash-plugin/integration_plugin.rb | 2 +- .../spec/shared_examples/cli/logstash-plugin/uninstall.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qa/acceptance/spec/shared_examples/cli/logstash-plugin/integration_plugin.rb b/qa/acceptance/spec/shared_examples/cli/logstash-plugin/integration_plugin.rb index c37d8652fb5..02afb1e3ed0 100644 --- a/qa/acceptance/spec/shared_examples/cli/logstash-plugin/integration_plugin.rb +++ b/qa/acceptance/spec/shared_examples/cli/logstash-plugin/integration_plugin.rb @@ -75,7 +75,7 @@ context "trying to uninstall an inner plugin" do it "fails to uninstall it" do result = logstash.run_sudo_command_in_path("bin/logstash-plugin uninstall logstash-input-rabbitmq") - expect(result.stderr).to match(/is already provided by/) + expect(result.stderr).to include("The plugin `logstash-input-rabbitmq` is provided by 'logstash-integration-rabbitmq' so it can't be removed individually") end end end diff --git a/qa/acceptance/spec/shared_examples/cli/logstash-plugin/uninstall.rb b/qa/acceptance/spec/shared_examples/cli/logstash-plugin/uninstall.rb index ea379008f49..d485c03ca8a 100644 --- a/qa/acceptance/spec/shared_examples/cli/logstash-plugin/uninstall.rb +++ b/qa/acceptance/spec/shared_examples/cli/logstash-plugin/uninstall.rb @@ -33,7 +33,7 @@ context "when the plugin isn't installed" do it "fails to uninstall it" do result = logstash.run_sudo_command_in_path("bin/logstash-plugin uninstall logstash-filter-qatest") - expect(result.stderr).to match(/This plugin has not been previously installed/) + expect(result.stderr).to include("The plugin `logstash-filter-qatest` has not been previously installed") end end