update posture check marshalling

This commit is contained in:
Pascal Fischer
2025-10-13 17:55:24 +02:00
parent 3fcf43114b
commit 726e162bee

View File

@@ -30,6 +30,7 @@ func TestChecks_MarshalJSON(t *testing.T) {
}, },
want: []byte(` want: []byte(`
{ {
"AccountID":"acc1",
"ID": "id1", "ID": "id1",
"Name": "name1", "Name": "name1",
"Description": "desc1", "Description": "desc1",
@@ -55,6 +56,7 @@ func TestChecks_MarshalJSON(t *testing.T) {
}, },
want: []byte(` want: []byte(`
{ {
"AccountID":"",
"ID": "", "ID": "",
"Name": "", "Name": "",
"Description": "", "Description": "",
@@ -94,6 +96,7 @@ func TestChecks_UnmarshalJSON(t *testing.T) {
name: "Valid JSON Posture Checks Unmarshal", name: "Valid JSON Posture Checks Unmarshal",
in: []byte(` in: []byte(`
{ {
"AccountID":"acc1",
"ID": "id1", "ID": "id1",
"Name": "name1", "Name": "name1",
"Description": "desc1", "Description": "desc1",
@@ -106,6 +109,7 @@ func TestChecks_UnmarshalJSON(t *testing.T) {
`), `),
expected: &Checks{ expected: &Checks{
ID: "id1", ID: "id1",
AccountID: "acc1",
Name: "name1", Name: "name1",
Description: "desc1", Description: "desc1",
Checks: ChecksDefinition{ Checks: ChecksDefinition{