Skip to content

Commit

Permalink
reverse expected and actual in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
neelayu committed Jan 21, 2024
1 parent 2ecf9f3 commit 204d355
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions plugins/outputs/nats/nats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func TestConnectAndWriteNATSIntegration(t *testing.T) {
Log: testutil.Logger{},
},
streamConfigCompareFunc: func(t *testing.T, si *jetstream.StreamInfo) {
require.Equal(t, si.Config.Name, "my-telegraf-stream")
require.Equal(t, si.Config.Subjects, []string{"telegraf"})
require.Equal(t, "my-telegraf-stream", si.Config.Name)
require.Equal(t, []string{"telegraf"}, si.Config.Subjects)
},
},
{
Expand Down Expand Up @@ -98,18 +98,18 @@ func TestConnectAndWriteNATSIntegration(t *testing.T) {
Log: testutil.Logger{},
},
streamConfigCompareFunc: func(t *testing.T, si *jetstream.StreamInfo) {
require.Equal(t, si.Config.Name, "telegraf-stream-with-cfg")
require.Equal(t, si.Config.Subjects, []string{"my-tel-sub0", "my-tel-sub1", "my-tel-sub2", "my-tel-sub-outer"})
require.Equal(t, si.Config.Retention, jetstream.WorkQueuePolicy)
require.Equal(t, si.Config.MaxConsumers, 10)
require.Equal(t, si.Config.Discard, jetstream.DiscardNew)
require.Equal(t, si.Config.Storage, jetstream.MemoryStorage)
require.Equal(t, si.Config.MaxMsgs, int64(100_000))
require.Equal(t, si.Config.MaxBytes, int64(104_857_600))
require.Equal(t, si.Config.MaxAge, time.Duration(10*time.Minute))
require.Equal(t, si.Config.Duplicates, time.Duration(5*time.Minute))
require.Equal(t, si.Config.MaxMsgSize, int32(120))
require.Equal(t, si.Config.MaxMsgsPerSubject, int64(500))
require.Equal(t, "telegraf-stream-with-cfg", si.Config.Name)
require.Equal(t, []string{"my-tel-sub0", "my-tel-sub1", "my-tel-sub2", "my-tel-sub-outer"}, si.Config.Subjects)
require.Equal(t, jetstream.WorkQueuePolicy, si.Config.Retention)
require.Equal(t, 10, si.Config.MaxConsumers)
require.Equal(t, jetstream.DiscardNew, si.Config.Discard)
require.Equal(t, jetstream.MemoryStorage, si.Config.Storage)
require.Equal(t, int64(100_000), si.Config.MaxMsgs)
require.Equal(t, int64(104_857_600), si.Config.MaxBytes)
require.Equal(t, 10*time.Minute, si.Config.MaxAge)
require.Equal(t, 5*time.Minute, si.Config.Duplicates)
require.Equal(t, int32(120), si.Config.MaxMsgSize)
require.Equal(t, int64(500), si.Config.MaxMsgsPerSubject)
},
},
}
Expand Down

0 comments on commit 204d355

Please sign in to comment.