Commit Graph

562 Commits

Author SHA1 Message Date
chuan
bb42a2158d Add support for Azure storage as a publishing backend
This adds a new configuration setting: AzurePublishEndpoints, similar
to the existing S3PublishEndpoints and SwiftPublishEndpoints.

For each endpoint, the following has to be defined:
 - accountName
 - accountKey
 - container
 - prefix

Azure tests require the following environment variables to be set:
 - AZURE_STORAGE_ACCOUNT
 - AZURE_STORAGE_ACCESS_KEY

With either of these not set, Azure-specific tests are skipped.
2022-01-21 11:46:36 +01:00
Joshua Colson
899ed92ebc Add -json flag to publish list|show
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Joshua Colson
129eb8644d Add -json flag to mirror list|show
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Joshua Colson
d582f9bab2 Add Debian 11 keys to test fixture keyring
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Joshua Colson
0f1575d5af Add -json flag to snapshot show|list
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Joshua Colson
1f56fb86e3 Add -json output flag to repo list|show
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Lorenzo Bolla
b385b1e975 Fix test breaking on newer versions of Go
Apparently, Go error message slightly changed in newer versions.
2021-02-12 09:23:24 +01:00
Lorenzo Bolla
c43d31f693 Don't fail hard if we can't clean Swift up 2021-02-08 10:52:27 +01:00
Lorenzo Bolla
e4259c5045 Always try to get a version
Even if a simple git hash.
2021-02-08 10:52:27 +01:00
Lorenzo Bolla
993dd2ad1c Print test exception right away, in case the full test run crashes 2021-02-08 10:52:27 +01:00
Lorenzo Bolla
3201244d9b Fix tests and fixtures relying on expired pgp keys
PGP tests relied on expired gpg keys: upgrade with newer Debian keys from
https://ftp-master.debian.org/keys.html.
Download new fixtures files from http://ftp.debian.org/debian/dists/buster/
2021-02-08 10:52:27 +01:00
Andrey Smirnov
b731e17850 Update nvidia repo key 2019-09-27 13:01:03 +03:00
Andrey Smirnov
c75ef8546e Fix system tests for Debian Stretch 9.11 2019-09-18 01:23:58 +03:00
Andrey Smirnov
d80c2b6104 Fix system tests 2019-09-06 23:42:56 +03:00
Raúl Benencia
7a5ac3dbc2 Tests for custom and default suite 2019-09-06 23:42:56 +03:00
Frank Steinborn
98e75f6d97 Make database open attempts configurable also via config file 2019-09-03 00:52:24 +03:00
Andrey Smirnov
060c6669c1 Remove test which relied on now gone mongodb repository
Looks like Mongo doesn't provide any regular structure repository
anymore (only flat one?).
2019-09-02 23:54:07 +03:00
Andrey Smirnov
26098f6c8d Print redirects being followed, drop mirror.yandex.ru.
Use CDN-backed Debian mirror to make tests run faster hopefully for
everyone. Redirects might be important to know what exactly is going on
when items are being downloaded.
2019-08-07 21:10:04 +03:00
Andrey Smirnov
021b6f694b Fix flakey tests related to identity name ordering. 2019-08-07 20:47:52 +03:00
Andrey Smirnov
f0a370db24 Rework HTTP downloader retry logic
Apply retries as global, config-level option `downloadRetries` so that
it can be applied to any aptly command which downloads objects.

Unwrap `errors.Wrap` which is used in downloader.

Unwrap `*url.Error` which should be the actual error returned from the
HTTP client, catch more cases, be more specific around failures.
2019-08-07 20:23:05 +03:00
Andrey Smirnov
2e7f624b34 Add test for publishing with non-empty Origin & Label
See also #848
2019-07-19 22:58:56 +03:00
Andrey Smirnov
ca5b7758ce Print when test is skipped 2019-07-11 00:49:36 +03:00
Andrey Smirnov
bb1def2910 Try Travis on xenial workers 2019-07-11 00:16:20 +03:00
Andrey Smirnov
673abae1be Update system tests after Debian buster was released. 2019-07-10 22:27:11 +03:00
Andrey Smirnov
56ca5e9e62 Temporary disable test as linux.dell.com is NXDOMAIN 2019-07-05 21:32:41 +03:00
Andrey Smirnov
2c91bcdc30 Bump Go versions for Travis, fix tests
Replace gometalinter with golangci-lint.

Fix system tests (wheezy is gone, replace with stretch).

Fix linter warnings.
2019-07-04 00:16:12 +03:00
Andrey Smirnov
61e00b5fbd Test updates for Travis CI
Travis is running Trusty with GPG 2.0.x, which is
much different from 2.1.x.

Add tests for default key signing.

Add test for gpg1/2 in functional.
2018-10-10 01:34:58 +03:00
Andrey Smirnov
1b2fccb615 Compatibility with GnuPG 1.x and 2.x, auto-detect GnuPG version
* aptly can sign and verify without issues with GnuPG 1.x and 2.x
* aptly auto-detects GnuPG version and adapts accordingly
* aptly automatically finds suitable GnuPG version

Majority of the work was to get unit-tests which can work with GnuPG 1.x & 2.x.
Locally I've verified that aptly supports GnuPG 1.4.x & 2.2.x. Travis CI
environment is based on trusty, so it runs gpg2 tests with GnuPG 2.0.x.

Configuration parameter gpgProvider now supports three values for GnuPG:

* gpg (same as before, default): use GnuPG 1.x if available (checks gpg, gpg1),
otherwise uses GnuPG 2.x; for aptly users who already have GnuPG 1.x
environment (as it was the only supported version) nothing should change; new
users might start with GnuPG 2.x if that's their installed version

* gpg1 looks for GnuPG 1.x only, fails otherwise

* gpg2 looks for GnuPG 2.x only, fails otherwise
2018-10-10 01:34:00 +03:00
Oliver Sauder
e23e30eb44 Merge branch 'master' into with_installer 2018-09-21 13:26:15 +02:00
Andrey Smirnov
5a9f4bee12 Fix system tests on master branch 2018-08-17 18:11:49 +03:00
Andrey Smirnov
747b9752ce Keep checksum of not compressed index file even if it's not uploaded
Fixes: #756
2018-07-14 00:17:36 +03:00
Oliver Sauder
b7323db31b Add detached signature to installer hashsum file 2018-07-06 15:02:37 +02:00
Oliver Sauder
108b0ea226 Add support to mirror non package installer files 2018-07-06 15:02:37 +02:00
Oliver Sauder
f1882cfe2c Expose repo include through API 2018-06-19 15:39:09 +02:00
Oliver Sauder
57a51d94ed Fix failing SHA512 checksums only test
This test has been failing very often because of changes in nvidia
repository. As this test is not related to filtering
remove number of filtered packages from output for a more robust test.
2018-06-15 15:43:37 +02:00
Harald Sitter
2be0b7859d update nvidia reference again
package count chainged again -.-

I am working on a fixture set for repositories so we can stop talking to
live repositories. that's quite the undertaking though, so let's fix the
output reference to unbreak the test in the meantime
2018-05-03 10:45:01 +02:00
Andrey Smirnov
e65fff058c Fix build on Travis 2018-04-13 23:55:49 +03:00
Andrey Smirnov
548dcdb242 Add google_compute_engine boto dependency (why???) 2018-04-13 23:53:01 +03:00
Andrey Smirnov
9a65bbe12c Add debug output on tests being skipped 2018-04-13 23:42:07 +03:00
Andrey Smirnov
5b85522400 Implement 'legacy' Contents indexes to match Ubuntu <=16.04
Another index is created which unifies data for all the components.

This certainly requires more resources as we have to build yet another
index.
2018-04-11 00:57:15 +03:00
Andrey Smirnov
b3b0dbb217 Go 1.10 fix 2018-03-16 13:02:38 +03:00
Andrey Smirnov
d76259496d Disable FTP tests in Travis 2018-03-16 11:32:22 +03:00
Andrey Smirnov
aa3a2ab595 New signing key for aptly repo, and small fixes
Build on Go 1.10, drop Go 1.7

Remove references to now defunct pgp.mit.edu, fix system test
2018-03-16 01:27:57 +03:00
Andrey Smirnov
58790dadc6 Merge branch 'master' into AcquireByHash 2018-01-27 17:16:24 +03:00
Harald Sitter
4fb57f65fb update nvidia mirror output ref
this repo now contains 12 packages not 8
2018-01-19 13:09:29 +01:00
Harald Sitter
75c4d6da3b properly expose AcquireByHash through the api
- new publish calls can now enable AcquireByHash by right away (previously
  one would have had to create a new publishing endpoint and then
  explicitly switch it to AcquireByHash)
- all json marshals of PublishedRepo now contain AcquireByHash (allows
  inspecting if a given endpoint has AcquireByHash enabled already; also
  enables verification that a switch/update actually applied a
  potential AcquireByHash change
- update all tests to reflect that default state of AcquireByHash
- update creation and switch testing to explicitly toggle AcquireByHash to
  make sure state mutation works as expected
2018-01-15 17:04:05 +01:00
Oliver Sauder
b4f3573d11 Add acquire by hash when updating publish 2017-11-30 09:46:02 +01:00
Oliver Sauder
4718625388 Avoid exception when failing tests doesn't have a doc string 2017-11-30 09:46:02 +01:00
Oliver Sauder
2bd0b786ea Extend publish snapshot test with acquire by hash 2017-11-30 09:46:02 +01:00
Oliver Sauder
5d301fb1b7 Prepare archive root when editing it 2017-11-27 11:08:31 +01:00