collectfast icon indicating copy to clipboard operation
collectfast copied to clipboard

Implement OpenStack Swift support

Open Urth opened this issue 4 years ago • 2 comments

  • Implement OpenStack Swift support using django-storage-swift.
  • Add pre_collect_hook to collectfast.strategies.base.Strategy.
  • Replace test_many test generator with pytest parametrize.
  • Add pytest marks for easy test selection.
  • Add pytest skip checks for storage settings and dependencies.
  • Add tests for S3ManifestStaticStorage.
  • Replace override_storage_attr with mock.patch.object to support overriding instance attributes.

I realize the scope of this pull request suffers from creep but the primary intention was to get a fork working for us. The pytest changes add some great quality of life improvements for development and testing of specific storage backends.

To support the OpenStackSwiftStrategy we only really need a pre_collect_hook and gzip_compresslevel setting provided by collectfast and I'll happily make a separate pull request for that if you do not want to accept another 3rd party storage backend/strategy. OpenStack Swift was developed and open sourced by Rackspace https://docs.openstack.org/swift/latest/

Urth avatar Jun 23 '21 13:06 Urth

@Urth This is awesome, thanks! I'll try to look into what it takes to setup a Swift backend to test against, that will take some time.

antonagestam avatar Jun 24 '21 09:06 antonagestam

I can provide an account on ours if you want, you can email me on the address used in the commit.

Urth avatar Jun 24 '21 11:06 Urth