diff --git a/models/config.go b/models/config.go index 826c2489..e6510b21 100644 --- a/models/config.go +++ b/models/config.go @@ -352,8 +352,8 @@ type RelatedConfig struct { Name string `json:"name"` Type string `json:"type"` Tags types.JSONStringMap `json:"tags"` - Changes *types.JSONMap `json:"changes,omitempty"` - Analysis *types.JSONMap `json:"analysis,omitempty"` + Changes types.JSON `json:"changes,omitempty"` + Analysis types.JSON `json:"analysis,omitempty"` CostPerMinute *float64 `json:"cost_per_minute,omitempty"` CostTotal1d *float64 `json:"cost_total_1d,omitempty"` CostTotal7d *float64 `json:"cost_total_7d,omitempty"` diff --git a/tests/config_relationship_test.go b/tests/config_relationship_test.go index 18ef43e9..73a106a0 100644 --- a/tests/config_relationship_test.go +++ b/tests/config_relationship_test.go @@ -190,7 +190,7 @@ var _ = ginkgo.Describe("Config relationship", ginkgo.Ordered, func() { Expect(len(relatedConfigs)).To(Equal(2)) for _, rc := range relatedConfigs { Expect(rc.Relation).To(Equal("ClusterNode")) - Expect(rc.Type).To(Equal(models.RelatedConfigTypeOutgoing)) + Expect(rc.RelationType).To(Equal(models.RelatedConfigTypeOutgoing)) Expect(rc.ID.String()).To(BeElementOf([]string{dummy.KubernetesNodeA.ID.String(), dummy.KubernetesNodeB.ID.String()})) } }) @@ -202,7 +202,7 @@ var _ = ginkgo.Describe("Config relationship", ginkgo.Ordered, func() { Expect(len(relatedConfigs)).To(Equal(1)) Expect(relatedConfigs[0].Relation).To(Equal("ClusterNode")) - Expect(relatedConfigs[0].Type).To(Equal(models.RelatedConfigTypeIncoming)) + Expect(relatedConfigs[0].RelationType).To(Equal(models.RelatedConfigTypeIncoming)) Expect(relatedConfigs[0].ID.String()).To(Equal(dummy.KubernetesCluster.ID.String())) }) })