diff --git a/tests/data/rules/falco.go b/tests/data/rules/falco.go index dcc1efc..03ab7f0 100644 --- a/tests/data/rules/falco.go +++ b/tests/data/rules/falco.go @@ -352,13 +352,6 @@ var InvalidAppendMacro = run.NewStringFileAccessor( `, ) -var InvalidAppendMacroDangling = run.NewStringFileAccessor( - "invalid_append_macro_dangling.yaml", - `- macro: dangling append - condition: and evt.type=execve - append: true`, -) - var InvalidAppendMacroMultipleDocs = run.NewStringFileAccessor( "invalid_append_macro_multiple_docs.yaml", `--- @@ -647,15 +640,6 @@ var ListAppend = run.NewStringFileAccessor( `, ) -var ListAppendFailure = run.NewStringFileAccessor( - "list_append_failure.yaml", - ` -- list: my_list - items: [not-cat] - append: true -`, -) - var ListAppendFalse = run.NewStringFileAccessor( "list_append_false.yaml", ` @@ -987,15 +971,6 @@ var RuleAppend = run.NewStringFileAccessor( `, ) -var RuleAppendFailure = run.NewStringFileAccessor( - "rule_append_failure.yaml", - ` -- rule: my_rule - condition: evt.type=open - append: true -`, -) - var RuleAppendFalse = run.NewStringFileAccessor( "rule_append_false.yaml", ` diff --git a/tests/falco/legacy_test.go b/tests/falco/legacy_test.go index a13ca8f..1d38a9e 100644 --- a/tests/falco/legacy_test.go +++ b/tests/falco/legacy_test.go @@ -521,23 +521,6 @@ func TestFalco_Legacy_ListSubBare(t *testing.T) { assert.Equal(t, 0, res.ExitCode()) } -func TestFalco_Legacy_InvalidAppendMacroDangling(t *testing.T) { - t.Parallel() - checkDefaultConfig(t) - res := falco.Test( - tests.NewFalcoExecutableRunner(t), - falco.WithOutputJSON(), - falco.WithRulesValidation(rules.InvalidAppendMacroDangling), - ) - assert.NotNil(t, res.RuleValidation().AllErrors(). - OfCode("LOAD_ERR_VALIDATE"). - OfItemType("macro"). - OfItemName("dangling append"). - OfMessage("Macro has 'append' key but no macro by that name already exists")) - assert.Error(t, res.Err(), "%s", res.Stderr()) - assert.Equal(t, 1, res.ExitCode()) -} - func TestFalco_Legacy_InvalidOverwriteMacroMultipleDocs(t *testing.T) { t.Parallel() checkDefaultConfig(t) @@ -1096,23 +1079,6 @@ func TestFalco_Legacy_MonitorSyscallDropsLog(t *testing.T) { assert.Equal(t, 0, res.ExitCode()) } -func TestFalco_Legacy_InvalidRuleAppendDangling(t *testing.T) { - t.Parallel() - checkDefaultConfig(t) - res := falco.Test( - tests.NewFalcoExecutableRunner(t), - falco.WithOutputJSON(), - falco.WithRulesValidation(rules.RuleAppendFailure), - ) - assert.NotNil(t, res.RuleValidation().AllErrors(). - OfCode("LOAD_ERR_VALIDATE"). - OfItemType("rule"). - OfItemName("my_rule"). - OfMessage("Rule has 'append' key but no rule by that name already exists")) - assert.Error(t, res.Err(), "%s", res.Stderr()) - assert.Equal(t, 1, res.ExitCode()) -} - func TestFalco_Legacy_InvalidOverwriteRule(t *testing.T) { t.Parallel() checkDefaultConfig(t) @@ -1713,23 +1679,6 @@ func TestFalco_Legacy_InvalidArrayItemNotObject(t *testing.T) { assert.Equal(t, 1, res.ExitCode()) } -func TestFalco_Legacy_InvalidListAppendDangling(t *testing.T) { - t.Parallel() - checkDefaultConfig(t) - res := falco.Test( - tests.NewFalcoExecutableRunner(t), - falco.WithOutputJSON(), - falco.WithRulesValidation(rules.ListAppendFailure), - ) - assert.NotNil(t, res.RuleValidation().AllErrors(). - OfCode("LOAD_ERR_VALIDATE"). - OfItemType("list"). - OfItemName("my_list"). - OfMessage("List has 'append' key but no list by that name already exists")) - assert.Error(t, res.Err(), "%s", res.Stderr()) - assert.Equal(t, 1, res.ExitCode()) -} - func TestFalco_Legacy_RuleExceptionSecondItem(t *testing.T) { t.Parallel() checkDefaultConfig(t)