1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

feat: keeps the order of json keys. see fixes #2970 (#2971)

This commit is contained in:
Amir Raminfar
2024-05-22 15:59:54 -07:00
committed by GitHub
parent 38352379ab
commit 1d1f3ed36a
6 changed files with 30 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ import (
"testing"
"time"
"github.com/iancoleman/orderedmap"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -80,6 +81,8 @@ func waitTimeout(wg *sync.WaitGroup, timeout time.Duration) bool {
}
func Test_createEvent(t *testing.T) {
data := orderedmap.New()
data.Set("key", "value")
type args struct {
message string
}
@@ -102,9 +105,7 @@ func Test_createEvent(t *testing.T) {
message: "2020-05-13T18:55:37.772853839Z {\"key\": \"value\"}",
},
want: &LogEvent{
Message: map[string]interface{}{
"key": "value",
},
Message: data,
},
},
{