diff --git a/service/lib/agama/storage/config_conversions/to_json_conversions/search.rb b/service/lib/agama/storage/config_conversions/to_json_conversions/search.rb index 9cc21417f9..957392e25b 100644 --- a/service/lib/agama/storage/config_conversions/to_json_conversions/search.rb +++ b/service/lib/agama/storage/config_conversions/to_json_conversions/search.rb @@ -33,13 +33,6 @@ def self.config_type Configs::Search end - # @see Base#convert - def convert - return SEARCH_ANYTHING_STRING if config.all_if_any? - - super - end - private # @see Base#conversions diff --git a/service/lib/agama/storage/configs/search.rb b/service/lib/agama/storage/configs/search.rb index 6066ec9bb8..abc826b9da 100644 --- a/service/lib/agama/storage/configs/search.rb +++ b/service/lib/agama/storage/configs/search.rb @@ -71,13 +71,6 @@ def always_match? name.nil? end - # Whether the search matches all the available devices, skipping if none is found - # - # @return [Boolean] - def all_if_any? - always_match? && max.nil? && if_not_found == :skip - end - # Whether the section containing the search should be skipped # # @return [Boolean] diff --git a/service/test/agama/storage/config_conversions/to_json_test.rb b/service/test/agama/storage/config_conversions/to_json_test.rb index 977c0f5f13..4b6b9d1062 100644 --- a/service/test/agama/storage/config_conversions/to_json_test.rb +++ b/service/test/agama/storage/config_conversions/to_json_test.rb @@ -150,11 +150,15 @@ context "if there are no conditions or limits and errors should be skipped" do let(:search) { { ifNotFound: "skip" } } - it "generates a wildcard" do + it "generates the expected JSON" do config_json = result_scope.call(subject.convert) search_json = config_json[:search] - expect(search_json).to eq "*" + expect(search_json).to eq( + { + ifNotFound: "skip" + } + ) end end end