Skip to content

Commit

Permalink
adding test case
Browse files Browse the repository at this point in the history
  • Loading branch information
tahmidefaz committed Jul 16, 2024
1 parent 93718f1 commit 93549e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/api/tests/private/highLevelConnectionStatus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var _ = Describe("high level connection status", func() {
satOrgID := SatelliteOrgId("5")
satelliteHost := []HostId{"c484f980-ab8d-401b-90e7-aa1d4ccf8c0e"}
directConnectHost := []HostId{"fe30b997-c15a-44a9-89df-c236c3b5c540"}
ansibleHost := AnsibleHost("test-ansible-host")

payload := ApiInternalHighlevelConnectionStatusJSONRequestBody{
Hosts: []string{"c484f980-ab8d-401b-90e7-aa1d4ccf8c0e"},
Expand All @@ -51,6 +52,7 @@ var _ = Describe("high level connection status", func() {
Expect((*result)[0].SatOrgId).To(Equal(satOrgID))
Expect((*result)[0].Status).To(Equal("connected"))
Expect((*result)[0].Systems).To(Equal(satelliteHost))
Expect((*result)[0].AnsibleHost).To(BeEmpty())

Expect((*result)[1].Recipient).To(Equal(public.RunRecipient("32af5948-301f-449a-a25b-ff34c83264a2")))
Expect((*result)[1].RecipientType).To(Equal(RecipientType_directConnect))
Expand All @@ -59,5 +61,6 @@ var _ = Describe("high level connection status", func() {
Expect((*result)[1].SatOrgId).To(BeEmpty())
Expect((*result)[1].Status).To(Equal("connected"))
Expect((*result)[1].Systems).To(Equal(directConnectHost))
Expect((*result)[1].AnsibleHost).To(Equal(ansibleHost))
})
})

0 comments on commit 93549e0

Please sign in to comment.