mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
update posture check marshalling
This commit is contained in:
@@ -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{
|
||||||
|
|||||||
Reference in New Issue
Block a user