1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-14 11:57:32 +00:00
policy-reporter/pkg/api/server_test.go
Frank Jogeleit e8121ae53f
update repository owner (#50)
Signed-off-by: Frank Jogeleit <fj@move-elevator.de>
2021-07-23 10:05:20 +02:00

25 lines
608 B
Go

package api_test
import (
"net/http"
"testing"
"github.com/kyverno/policy-reporter/pkg/api"
"github.com/kyverno/policy-reporter/pkg/report"
"github.com/kyverno/policy-reporter/pkg/target"
"github.com/kyverno/policy-reporter/pkg/target/discord"
"github.com/kyverno/policy-reporter/pkg/target/loki"
)
func Test_NewServer(t *testing.T) {
server := api.NewServer(
report.NewPolicyReportStore(),
[]target.Client{
loki.NewClient("http://localhost:3100", "debug", true, &http.Client{}),
discord.NewClient("http://webhook:2000", "", false, &http.Client{}),
},
8080,
)
go server.Start()
}