refactor: Refactor of the publish path and HttpTransport #162
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To improve the testability of publishing a package,
PyOci.publish_package()
is split into multiple methods.Tests for the refactored parts were moved/restructured so it is no longer needed to go through the entire request flow for every test (including mockito).
A new Trait
Transport
is introduced andPyOci
is generic overTransport
.This allows swapping the
HttpTransport
in unittests in the future, removing the need to mockito in a lot of cases.Annotations have been structured a bit more.
PyOci :: Label ::
classifiers.The
com.pyoci.sha256_digest
annotation is added containing the SHA256 digest of the package blob.This is a first step to make #160 work in an effective manner.
BEGIN_COMMIT_OVERRIDE
refactor: Refactor of the publish path and HttpTransport #162
feat: SHA256 digest of the provided content is checked against the provided
sha256_digest
in the request. #162END_COMMIT_OVERRIDE