Skip to content

Commit

Permalink
WIP: Resolved tests
Browse files Browse the repository at this point in the history
Signed-off-by: Janice Bailey <[email protected]>
  • Loading branch information
Ryan Hall authored and bjanice75 committed May 22, 2024
1 parent 3759e24 commit 3a3bac3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions configtemplate/metadata/pivnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ var _ = Describe("Pivnet Client", func() {
server.RouteToHandler("GET", "/api/v2/products/example-product/releases/1",
ghttp.RespondWith(http.StatusOK, `{"id":1}`),
)
server.RouteToHandler("POST", "/api/v2/products/example-product/releases/1/pivnet_resource_eula_acceptance",
ghttp.RespondWith(http.StatusOK, `{}`),
)
server.RouteToHandler("GET", "/api/v2/products/example-product/releases/1/file_groups",
ghttp.RespondWith(http.StatusOK, `{}`),
)
Expand Down
1 change: 1 addition & 0 deletions depstability/records/depnames-7.11.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ github.com/go-ole/go-ole
github.com/go-playground/locales
github.com/go-playground/universal-translator
github.com/go-task/slim-sprig
github.com/go-task/slim-sprig/v3
github.com/gofrs/uuid
github.com/golang-jwt/jwt/v4
github.com/golang/glog
Expand Down
1 change: 0 additions & 1 deletion download_clients/pivnet_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ func (p *pivnetClient) Name() string {
}

func (p *pivnetClient) GetLatestProductFile(slug, version, glob string) (FileArtifacter, error) {

// 1. Check the release for given version / slug
release, err := p.downloader.ReleaseForVersion(slug, version)
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions download_clients/pivnet_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ var _ = Describe("Grabbing Metadata", func() {
ghttp.VerifyRequest("GET", "/api/v2/products/pivnet-product/releases/24"),
ghttp.RespondWith(http.StatusOK, `{"id":24}`),
),
ghttp.CombineHandlers(
ghttp.VerifyRequest("POST", "/api/v2/products/pivnet-product/releases/24/pivnet_resource_eula_acceptance"),
ghttp.RespondWith(http.StatusOK, ""),
),
ghttp.CombineHandlers(
ghttp.VerifyRequest("GET", "/api/v2/products/pivnet-product/releases/24/product_files"),
ghttp.RespondWith(http.StatusOK, fmt.Sprintf(`{
Expand Down

0 comments on commit 3a3bac3

Please sign in to comment.