Skip to content

Commit

Permalink
mocks
Browse files Browse the repository at this point in the history
Signed-off-by: Leandro Mendes <[email protected]>
  • Loading branch information
theflockers committed Dec 19, 2024
1 parent 75dc081 commit f02d3a6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 205 deletions.
10 changes: 10 additions & 0 deletions internal/tasks/update-fbc-catalog-task/tests/mocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ function curl() {
build=$(cat build_json)
export build
;;
"https://fakeiib.host/api/v1/builds/1/logs")
echo "Logs are for weaks"
;;
*)
echo ""
;;
Expand All @@ -85,6 +88,13 @@ function kinit() {
echo "Ok"
}

function skopeo() {
shift
if [[ "$@" == "--raw docker://registry-proxy-stage.engineering.redhat.com/rh-osbs-stage/iib:1" ]]; then
echo '{"manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "digest": "sha256:000" }] }'
fi
}

# the watch_build_state can't reach some mocks by default, so exporting them fixes it.
export -f curl
export -f mock_build_progress
Loading

0 comments on commit f02d3a6

Please sign in to comment.