Skip to content

Commit

Permalink
new(test/events): event collections init test
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
  • Loading branch information
leogr committed Apr 10, 2020
1 parent c76105f commit a907ca3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"regexp"

// register event categories
// register event collections
_ "github.com/falcosecurity/event-generator/events/k8saudit"
_ "github.com/falcosecurity/event-generator/events/syscall"

Expand Down
17 changes: 17 additions & 0 deletions test/events/init_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package events

import (
"testing"

evtPkg "github.com/falcosecurity/event-generator/events"
"github.com/stretchr/testify/assert"

// Register collections and run initialization
// Duplicated name or init failure will be caught here
_ "github.com/falcosecurity/event-generator/events/k8saudit"
_ "github.com/falcosecurity/event-generator/events/syscall"
)

func TestEventPackages(t *testing.T) {
assert.NotEmpty(t, evtPkg.All())
}

0 comments on commit a907ca3

Please sign in to comment.