Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix response integrity check bug (#23) and fix missing tests data #25

Merged
merged 2 commits into from
Dec 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions hocker.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ extra-source-files:
README.md
CHANGELOG.md

data-dir:
test/data

source-repository head
type: git
location: https://github.com/awakesecurity/hocker.git
Expand Down
3 changes: 1 addition & 2 deletions src/Network/Wreq/Docker/Image.hs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fetchLayer =
writeC <- liftIO $ getConcurrentOutputter
liftIO . writeC . Text.unpack $ "Downloading layer: " <> shortRef

fetchedImageLayer <- checkResponseIntegrity' =<< Docker.Registry.fetchLayer ("sha256:" <> layerDigest)
fetchedImageLayer <- Docker.Registry.fetchLayer ("sha256:" <> layerDigest)
layerPath <- writeRespBody layerOut layerDigest fetchedImageLayer

liftIO . writeC $ Text.unpack ("=> wrote " <> shortRef)
Expand All @@ -125,7 +125,6 @@ fetchConfig =
runHocker $ ask >>= \HockerMeta{..} -> do
configDigest <-
fetchManifest
>>= checkResponseIntegrity'
>>= getConfigDigest . view Wreq.responseBody

fetchImageConfig configDigest
Expand Down