mirror of
https://github.com/hanzoai/o11y-foundry.git
synced 2026-10-30 18:26:45 +00:00
#### Features - Adds collectionAgent Casting Kind Related: https://github.com/SigNoz/platform-pod/issues/1970
27 lines
485 B
Go
27 lines
485 B
Go
package collectionagent
|
|
|
|
import (
|
|
"encoding/json"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestSchema(t *testing.T) {
|
|
t.Parallel()
|
|
assert.NotNil(t, Schema())
|
|
}
|
|
|
|
func TestSchemaValidatesDefault(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
contents, err := json.Marshal(Default())
|
|
require.NoError(t, err)
|
|
|
|
var payload map[string]any
|
|
require.NoError(t, json.Unmarshal(contents, &payload))
|
|
|
|
assert.NoError(t, Schema().Validate(payload))
|
|
}
|