Skip to content

Commit

Permalink
Use unique source ID for the unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed Apr 25, 2024
1 parent c18842d commit 62d1ceb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/events/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestRouterRoute(t *testing.T) {
require.NoError(t, daemon.LoadConfig("../../config.example.yml"), "loading config file should not fail")

// Insert a dummy sources for our test cases!
source := config.Source{ID: 1, Type: "notifications", Name: "Icinga Notifications", Icinga2InsecureTLS: types.Bool{Bool: false, Valid: true}}
source := config.Source{ID: 10, Type: "notifications", Name: "Icinga Notifications", Icinga2InsecureTLS: types.Bool{Bool: false, Valid: true}}
stmt, _ := db.BuildInsertStmt(source)
_, err := db.NamedExecContext(ctx, stmt, source)
require.NoError(t, err, "populating source table should not fail")
Expand Down Expand Up @@ -124,7 +124,7 @@ func TestRouterRoute(t *testing.T) {
// makeEvent creates a fully initialised event.Event of the given type and severity.
func makeEvent(t *testing.T, typ string, severity event.Severity) *event.Event {
return &event.Event{
SourceId: 1,
SourceId: 10,
Name: testutils.MakeRandomString(t),
URL: "https://localhost/icingaweb2/icingadb",
Type: typ,
Expand Down

0 comments on commit 62d1ceb

Please sign in to comment.