Commit Graph

60 Commits

Author SHA1 Message Date
Markus Muellner 8e62195eb5 implement structured logging 2023-02-20 13:42:50 +01: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
Markus Muellner db19a56458 Add functional test for metrics endpoint 2022-04-12 14:39:16 +02: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
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 787cc8e3ee Fix system tests 2022-01-27 09:30:14 +01:00
Frank Steinborn 98e75f6d97 Make database open attempts configurable also via config file 2019-09-03 00:52:24 +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 ca5b7758ce Print when test is skipped 2019-07-11 00:49:36 +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 108b0ea226 Add support to mirror non package installer files 2018-07-06 15:02:37 +02:00
Andrey Smirnov d76259496d Disable FTP tests in Travis 2018-03-16 11:32:22 +03:00
Andrey Smirnov 359cda9d99 Add system test for repo with SHA512-only checksums 2017-11-08 19:45:22 +03:00
Harald Sitter f43801cb96 whitelist falke E722 in system/lib.py
'E722 do not use bare except' wants us not to use except without type
restriction as it catches everything and the kitchen sink. Since we use
them to catch exceptions in test cases this is intentional as we implement
general purpose error handling on test failure there.
2017-10-31 12:42:11 +01:00
Andrey Smirnov f54e798eac Add system test for fixed checksum matching 2017-05-23 03:00:16 +03:00
Andrey Smirnov c798db8056 Add system's requirements.txt, enforce flake8 linter
Fix style issues in functional tests.
2017-04-28 00:05:11 +03:00
jolo 96948d6f18 Basic test of graph layout 2017-01-17 00:46:51 +01:00
Andrey Smirnov 4e3284cd98 Check contents of contents index being generated. #142 2015-04-02 01:19:51 +03:00
Andrey Smirnov 103fa5310f First pack of system tests for aptly repo include. #71 2015-03-16 22:50:58 +03:00
Andrey Smirnov eb0443ed51 Tests for publish list API + verify that publishing actually creates files. #116 2015-03-03 20:35:48 +03:00
Andrey Smirnov d20300b152 Whitespace fix. #168 2015-02-05 01:46:57 +03:00
Sylvain Baubeau d983e10d08 Add snapshots API test suite 2014-12-18 16:33:15 +01:00
Andrey Smirnov 9fbe33b356 System test for file override from pool. #127 2014-10-17 00:54:42 +04:00
Simon Aquino 951b6e9004 Test to avoid published file truncation when added to repo
This test will make sure that when a published file is added to repo, it
doesn't get truncated.
2014-10-16 16:57:50 +01:00
Andrey Smirnov 523d0d0945 Library for API system tests. #116 2014-10-10 17:43:04 +04:00
Andrey Smirnov 2c84faaf8d System test for repo adding .udebs. #108 2014-09-30 21:26:28 +04:00
Andrey Smirnov 0130fc0392 Add -force-replace flag to repo aptly add to replace conflicting packages. #83 2014-09-01 17:59:29 +04:00
Andrey Smirnov 74eee3496c Capture test results in prepared format. #81 2014-08-26 23:58:25 +04:00
Andrey Smirnov 7416cc403d Update system test config file. #62 2014-07-13 16:11:07 +04:00
Andrey Smirnov a54a366c95 New config setting: downloadSpeedLimit to limit download speed. #62 2014-07-13 15:47:44 +04:00
Andrey Smirnov 9fb8a0ea4b Capturing results for other command output. 2014-07-12 21:53:47 +04:00
Andrey Smirnov 1a92d8bfe9 Add --capture to auto-create 'gold' results when fail. 2014-07-07 23:29:36 +04:00
Andrey Smirnov 10bbefeb25 Fix support for flat format repositories in subdirectories with common pool. #47 2014-05-10 16:56:50 +04:00
Andrey Smirnov 53adf39d89 Bring back automatic HTTP_PROXY setting from environment. #46 2014-05-10 13:27:01 +04:00
Andrey Smirnov 173dd775bc Tests for aptly db recover. #25 2014-04-05 17:01:16 +04:00
Andrey Smirnov d9bd016d1f New config options. 2014-03-06 21:09:40 +04:00
Andrey Smirnov 653a7d8d5a System tests for aptly repo add.. 2014-02-26 13:08:55 +04:00
Andrey Smirnov d8fe97e0cb System tests for snapshots verification with sources. 2014-02-17 20:53:22 +04:00
Andrey Smirnov 812bc6e1e1 Updating mirrors with sources. 2014-02-17 16:16:55 +04:00
Andrey Smirnov fb2e1adb5c Use different keyring in system tests. 2014-02-12 21:25:55 +04:00
Andrey Smirnov ced832b1c0 System test for aptly db cleanup. 2014-02-12 20:33:16 +04:00
Andrey Smirnov 955b09a41c Add one more key for flat repos. 2014-02-10 15:05:18 +04:00
Andrey Smirnov 3e5d54f3ef Use config file with all options. 2014-02-07 20:47:29 +04:00
Andrey Smirnov 87c0430628 Import keys as trusted. 2014-02-07 12:17:55 +04:00
Andrey Smirnov cf3dc6be27 Tests for mirroring repositories with signatures. 2014-02-07 12:06:38 +04:00
Andrey Smirnov 62d3c625ed Support for internal webserver in tests. 2014-02-03 23:15:50 +04:00