Skip to content

Commit

Permalink
Refactor http request code in pkg/quay (konflux-ci#56)
Browse files Browse the repository at this point in the history
* Refactor http request code in pkg/quay

This refactor helps to reduce duplicate code in pkg/quay and improve the
test coverage in pkg/quay.

Signed-off-by: Chenxiong Qi <[email protected]>

* Add test cases for QuayClient.IsRepositoryPublic

Rewrite the assertions with assert.

Signed-off-by: Chenxiong Qi <[email protected]>

* Use fiction registry API url in tests

Signed-off-by: Chenxiong Qi <[email protected]>

* Do not use underscore in function name

Signed-off-by: Chenxiong Qi <[email protected]>

* Use gock Matcher in pkg/quay test cases

Signed-off-by: Chenxiong Qi <[email protected]>

* Restore quay.io api url in quay_debug_test

I misunderstood the usage of quay_debug_test.go. This patch restores the
API url there and defines a fake url for unit tests specifically.

Signed-off-by: Chenxiong Qi <[email protected]>

---------

Signed-off-by: Chenxiong Qi <[email protected]>
  • Loading branch information
tkdchen authored Aug 23, 2023
1 parent 2276356 commit 35f1168
Show file tree
Hide file tree
Showing 2 changed files with 466 additions and 361 deletions.
Loading

0 comments on commit 35f1168

Please sign in to comment.