Revision f92e695a
Added by David Davis almost 7 years ago
test/csv_test_helper.rb | ||
---|---|---|
end
|
||
end
|
||
|
||
def content_view_filter_delete(org, cv, name)
|
||
id = nil
|
||
stdout,stderr = capture {
|
||
hammer.run(%W(content-view filter list --search name=#{name} --content-view #{cv} --organization #{org}))
|
||
}
|
||
lines = stdout.split("\n")
|
||
if lines.length == 5
|
||
id = lines[3].split(" ")[0]
|
||
end
|
||
|
||
if id
|
||
stdout,stderr = capture {
|
||
hammer.run(%W(content-view filter delete --id #{id}))
|
||
}
|
||
end
|
||
end
|
||
|
||
require File.join(File.dirname(__FILE__), 'apipie_resource_mock')
|
||
require File.join(File.dirname(__FILE__), 'helpers/command')
|
||
require File.join(File.dirname(__FILE__), 'helpers/resource_disabled')
|
Also available in: Unified diff
Fixes #19927 - Drop and readd rules when importing filters
This is a change to the way we handle filter rules. Basically, there is
no way to ensure uniqueness among filter rules so updating rules isn't
possible. The package filter rule has a unique check but it simply
checks ALL fields to see if the rule exists already. This doesn't really
allow for matching though since any field change would constitute a new
rule. Since we're importing/updating filters and not rules, I think
dropping the rules and recreating them is the best way to handle
updates.