Skip to content

Commit

Permalink
fix: schema
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Mar 7, 2024
1 parent d8aa652 commit 8351241
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions models/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
4 changes: 2 additions & 2 deletions tests/config_relationship_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()}))
}
})
Expand All @@ -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()))
})
})

0 comments on commit 8351241

Please sign in to comment.