Skip to content

Commit

Permalink
new release 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Issif committed Jun 13, 2019
1 parent 6c71139 commit b4a9e7c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 2.2.0 - 2019-06-13
#### New
- A minimum priority for each output can be set
- New output : **Influxdb** ([issue #4](https://github.com/Issif/falcosidekick/issues/4))
#### Fix
- Panic happened when trying to add `customfields` but falco event hadn't

## 2.1.0 - 2019-06-12
#### New
- Custom fields can be added to falco events (see README) ([PR#26](https://github.com/Issif/falcosidekick/pull/26) thanks to [@zetaab](https://github.com/zetaab))
Expand Down
21 changes: 21 additions & 0 deletions outputs/influxdb_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package outputs

import (
"encoding/json"
"testing"

"github.com/Issif/falcosidekick/types"
)

func TestNewInfluxdbPayload(t *testing.T) {
expectedOutput := `"events,rule=Test_rule,priority=Debug,proc.name=falcosidekick,user.name=falcosidekick value=\"This is a test from falcosidekick\""`

var f types.FalcoPayload
json.Unmarshal([]byte(falcoTestInput), &f)
influxdbPayload, _ := json.Marshal(newInfluxdbPayload(f, &types.Configuration{}))

if string(influxdbPayload) != expectedOutput {
// t.Fatalf("\nexpected payload: \n%v\ngot: \n%v\n", o1, o2)
t.Fatalf("\nexpected payload: \n%v\ngot: \n%v\n", expectedOutput, string(influxdbPayload))
}
}

0 comments on commit b4a9e7c

Please sign in to comment.