Skip to content

Commit

Permalink
Add e2e tests for listing packages for an app
Browse files Browse the repository at this point in the history
  • Loading branch information
saffronjam authored and gcapizzi committed Mar 30, 2023
1 parent 7d4c60a commit c84d922
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/e2e/apps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,32 @@ var _ = Describe("Apps", func() {
})
})

Describe("List app packages", func() {
var (
result resourceList[typedResource]
pkgGUID string
)

BeforeEach(func() {
createSpaceRole("space_developer", certUserName, space1GUID)
appGUID = createApp(space1GUID, generateGUID("app"))
pkgGUID = createPackage(appGUID)
uploadTestApp(pkgGUID, procfileAppBitsFile())
})

JustBeforeEach(func() {
var err error
resp, err = certClient.R().SetResult(&result).Get("/v3/apps/" + appGUID + "/packages")
Expect(err).NotTo(HaveOccurred())
})

It("successfully lists the packages", func() {
Expect(resp).To(HaveRestyStatusCode(http.StatusOK))
Expect(result.Resources).To(HaveLen(1))
Expect(result.Resources[0].Type).To(Equal("bits"))
})
})

Describe("List app routes", func() {
var result resourceList[resource]

Expand Down

0 comments on commit c84d922

Please sign in to comment.