Markus Muellner
8e62195eb5
implement structured logging
2023-02-20 13:42:50 +01:00
Markus Muellner
2020ca9971
add ready and healthy probe endpoints
2022-12-12 13:39:07 +01:00
Josh Bayfield
b3d9055059
Fix system tests for custom codenames
2022-08-29 15:54:29 +02:00
Steven Stone
904265120b
Fix PublishSnapshot39Test_release_i386 system test
2022-08-29 15:54:29 +02:00
Steven Stone
47930a4214
Fix system test
2022-08-29 15:54:29 +02:00
Steven Stone
a59cad6f20
Enable the ability to pass in a custom codename
...
While testing out Aptly, the `apt-get` client complains with the following error, since the `codename` was switched from the InRelease files that are baked out by Aptly:
```
E: Repository 'http://debianrepo.example.com/bionic testing InRelease' changed its 'Codename' value from '' to 'testing'
```
2022-08-29 15:54:29 +02:00
Sjoerd Simons
393d1a6888
api: Allow querying the packages endpoint
...
The ".../packages" endpoints for mirror, local repos and snapshots all
share the same syntax for querying. However the "/api/packages" endpoint
doesn't match this. Adjust that to allow for a bit more consistency and
allow querying the full package database.
The current endpoint functionality "/packages/:name" is kept intact and
can be used the same as now
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com >
2022-08-29 10:28:44 +02:00
Benj Fassbind
42cfee2c09
Fix mirror test
2022-08-16 09:04:16 +02:00
Benj Fassbind
ff3bf4b180
Improve error messages
2022-07-13 08:33:48 +02:00
Benj Fassbind
1d4e6183be
Capture coverage of integration tests
...
To capture the coverage also for the integration tests,
a test only executing the cmd.Run function is used.
The test always exits with code 0 and prints the
real exit code to stdout. Otherwise no coverage
report is generated.
Those changes enable a more accurate coverage report
for future contributions.
2022-07-13 08:33:48 +02:00
Benj Fassbind
69d473ea6f
Fix failing mirror test
...
Add the https redirect to the gold ouptut of the test
as this was changed for the jenkins debian repos
and the tests were failing after this change.
2022-07-13 08:33:48 +02:00
Sjoerd Simons
f61514edaf
Allow disabling bzip2 compression for index files
...
Using bzip2 generates smaller index files (roughly 20% smaller Packages
files) but it comes with a big performance penalty. When publishing a
debian mirror snapshot (amd64, arm64, armhf, source) without contents
skipping bzip speeds things up around 1.8 times.
```
$ hyperfine -w 1 -L skip-bz2 true,false -m 3 -p "aptly -config aptly.conf publish drop bullseye || true" "aptly -config aptly.conf publish snapshot --skip-bz2={skip-bz2} --skip-contents --skip-signing bullseye"
Benchmark 1: aptly -config aptly.conf publish snapshot --skip-bz2=true --skip-contents --skip-signing bullseye
Time (mean ± σ): 35.567 s ± 0.307 s [User: 39.366 s, System: 10.075 s]
Range (min … max): 35.311 s … 35.907 s 3 runs
Benchmark 2: aptly -config aptly.conf publish snapshot --skip-bz2=false --skip-contents --skip-signing bullseye
Time (mean ± σ): 64.740 s ± 0.135 s [User: 68.565 s, System: 10.129 s]
Range (min … max): 64.596 s … 64.862 s 3 runs
Summary
'aptly -config aptly.conf publish snapshot --skip-bz2=true --skip-contents --skip-signing bullseye' ran
1.82 ± 0.02 times faster than 'aptly -config aptly.conf publish snapshot --skip-bz2=false --skip-contents --skip-signing bullseye'
```
Allow skipping bz2 creation for setups where faster publishing is more
important then Package file size.
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com >
2022-06-22 11:25:45 +02:00
Markus Muellner
db19a56458
Add functional test for metrics endpoint
2022-04-12 14:39:16 +02:00
Markus Muellner
6539e1b856
Add metrics endpoint with http metrics using Prometheus client lib
2022-04-12 14:39:16 +02:00
Reinhold Gschweicher
c1e577c1ac
Add unittest for zstd compression support
2022-04-04 17:51:21 +02:00
Lorenzo Bolla
fd404064c9
Use University of Utah mirror in tests
...
Fix #1034
2022-02-13 20:44:28 +01:00
Lorenzo Bolla
e8ec6385f3
Fix linting errors
2022-02-08 11:18:50 +01:00
Lorenzo Bolla
1361bf20dd
Revive skipped tests
2022-02-08 11:18:50 +01:00
Lorenzo Bolla
5d98546e1d
Use a more recent GPG key server
2022-02-08 11:18:50 +01:00
Lorenzo Bolla
1afcd68e01
Make downloader type configurable
2022-01-31 10:32:54 +01:00
Lorenzo Bolla
035d5314b0
Convert tests to Python 3
...
Fix #938
2022-01-27 15:06:33 +01:00
Lorenzo Bolla
70f7d7409a
Allow to check for empty output in tests
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
48635c8057
Strip irrelevant lines from test output
...
It may happen that aptly retries to download data during tests (maybe because
of a network issue), but our fixtures doesn't account for it. So, we strip
those irrelevant lines before comparison.
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
30e94064e5
Ignore dates in test
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
91c3ed8ec4
Fix failing tests
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
8ecd01be1f
Temporarily skip test failing on CI
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
4933e3caf4
Try to fix test failing on CI
...
PublishRepo26Test fails to run because something in the CI environment forces
gpg to ask for the user's password. Try to require gpg1 for the test, which
seems to run fine in other environments.
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
4a9a5bc713
Fix some failing system tests
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
7412b84e04
Fix flake8 lint errors
2022-01-27 09:30:14 +01:00
Ximon Eighteen
8e309b57b3
Workaround differences in the GHA Ubuntu 18.04 environment compared to the Travis CI Ubuntu 16.04 environment.
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
370e3cdfea
Fix unittests
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
787cc8e3ee
Fix system tests
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
914ddf4859
Fix syntax error
2022-01-27 09:30:14 +01:00
Oliver Sauder
b4efe6a810
Add db cleanup api
2022-01-27 09:30:14 +01:00
Oliver Sauder
f09a273ad7
Add publish output progress counting remaining number of packages
2022-01-27 09:30:14 +01:00
Oliver Sauder
b0ab8f417d
Added gpg api so mirror updates are fully functional from api
2022-01-27 09:30:14 +01:00
Oliver Sauder
d7ccf95499
Added mirror api based on task list
2022-01-27 09:30:14 +01:00
Oliver Sauder
6ab5e60833
Add task api and resource locking ability
2022-01-27 09:30:14 +01:00
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