Commit Graph

113 Commits

Author SHA1 Message Date
André Roth
696b78f207 docker: update dev env and documentation 2024-08-03 00:14:26 +02:00
André Roth
83a05a1900 golangci-lint: download and build before lint 2024-08-03 00:14:26 +02:00
André Roth
48a0bca35e allow s3 test in docker
read AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY from ./aws.creds when running:

  make docker-system-tests
2024-08-03 00:14:26 +02:00
André Roth
0b3dd2709b apply PR feedback 2024-07-31 22:16:00 +02:00
André Roth
640c202ee5 etcd: implement separate system tests
- add t13_etcd test directory
- etcd will be started for the unit tests and each system test
- etcd will load fixture DB export if requested by the test
- existing tests are reused for etcd testing
2024-07-31 22:16:00 +02:00
hudeng
59bf4501e8 feat: Use databaseBackend config repace databaseEtcd
databaseBackend config contains type and url sub config, It can facilitate the expansion of other types of databases in the future.
2024-07-31 22:16:00 +02:00
hudeng
f29449db14 feat: Add system test for etcd 2024-07-31 22:16:00 +02:00
hudeng
78172d11d7 feat: Add etcd database support
improve concurrent access and high availability of aptly with the help of the characteristics of etcd
2024-07-31 22:16:00 +02:00
André Roth
8b41ec48c8 use consistent golangci-lint version 2024-07-24 21:19:47 +02:00
André Roth
4a0bdcbb64 improve system tests
- log import errors for test modules
- log output only on test failure
- improve docker system test container
- use go 1.19 in docker system tests
- download go dependencies in docker container
- system tests: color failues output
- imrpove test result output
- do not install golangci-lint in system tests
2024-07-24 21:19:47 +02:00
André Roth
34c1c1f83a system-tests: make docker abortable and use colors 2024-06-15 19:18:14 +02:00
André Roth
efc5573b8e Makefile: run unit tests in docker 2024-06-15 19:18:14 +02:00
André Roth
2d97ba2bbd fix flake8 error 2024-06-15 19:18:14 +02:00
André Roth
9deb031c44 fix system tests
- use s3 mirror instead of internet download
- reduce download verbosity
- do not use venv in docker-system-tests
- be more verbose on test output
- do not run golangci-lint in system-tests
2024-04-11 10:15:02 +02:00
André Roth
50eaf6c0bb update docker / makefile 2024-03-06 12:46:44 +01:00
André Roth
e564b7c150 cleanup Makefile 2024-03-06 08:08:47 +01:00
André Roth
72a7780054 fix golint complaints 2024-03-06 06:21:36 +01:00
André Roth
d7cc9b89d1 system tests: use repository mirrors on S3 for reproducibility
no direct internet download from apt repositories,
which over time will change or cease to exist.

also migrate to gpg2 on newer ubuntu.
2024-02-05 13:04:45 +01:00
André Roth
a69aa7c533 system-tests: add Dockerfile 2024-02-05 13:04:45 +01:00
Mauro Regli
76744ead86 Fix Release failing 'Cannot find goxc' 2023-05-15 11:15:48 +02:00
Markus Muellner
bece12ad4d update golangci-lint to v1.51.2 2023-03-22 17:22:54 +01:00
Markus Muellner
2020ca9971 add ready and healthy probe endpoints 2022-12-12 13:39:07 +01:00
Markus Muellner
352f4e8772 update golangci-lint and replace deprecated calls to io/ioutil 2022-12-12 10:21:39 +01:00
Benj Fassbind
f0a85b2b6e Fix release build 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
Sjoerd Simons
a687df2f4f Use python3 for system tests
Most modern distribution use python3 for python (3). Default to that to
make it a bit simpler to run systems tests on Debian

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2022-06-20 09:39:23 +02:00
Benj Fassbind
d2d168f363 Fix system test env setup 2022-04-05 09:58:02 +02:00
Lorenzo Bolla
035d5314b0 Convert tests to Python 3
Fix #938
2022-01-27 15:06:33 +01:00
Ximon Eighteen
beb9d43f4d Use newer golangci-lint source as the former is abandoned. 2022-01-27 09:30:14 +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
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
2da853dcbe Bump golangci-lint to 19.1 2019-09-27 15:44:33 +03:00
Andrey Smirnov
19db62d74f Add new Go modules stuff 2019-09-27 13:59:19 +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
699323e2e0 Reimplement DB collections for mirrors, repos and snapshots
See #765, #761

Collections were relying on keeping in-memory list of all the objects
for any kind of operation which doesn't scale well the number of
objects in the database.

With this rewrite, objects are loaded only on demand which might
be pessimization in some edge cases but should improve performance
and memory footprint signifcantly.
2018-08-21 01:08:14 +03:00
Andrey Smirnov
b6fe16095b Move nightly builds to Travis CI
This updates previous work in #739 to build
Debian packages and zip files for other OS.

All the build artifacts are uploaded to S3
public bucket `aptly-nightly` so that there's
archive for all the builds.

All `.deb` packages are automatically uploaded
to repo.aptly.info/nightly on build.
2018-06-12 00:26:44 +03:00
Harald Sitter
9a30a11786 add support for travis attaching build artifacts to releases
- new phony target build: same as install but creating aptly-$version and
  putting it into a build/ subdir
- env TRAVIS_TAG in the makefile now overrides the TAG lookup, this ensures
  that the tag travis is working with is actually the one being used to
  construct the version number
- subdir is gitignored
- travis runs new target - lists artifacts - deploys artifacts to github

all of the above only happens on builds that are a tag and DEPLOY_BINARIES
is set to yes (which is only the case for latest stable go version)
2018-05-14 17:27:14 +02:00
Andrey Smirnov
2a8aff9746 Change build settings to speed up builds
1. Don't run long steps for Go versions other than 1.9 & 1.10
according to Golang Release Policy (two latest versions).

2. Switch to codecov.io, collect coverage only on Go 1.10 which
has fixes for multi-module coverage & ./... ignoring vendor.

3. Simplify Makefile.
2018-04-18 01:19:26 +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
Maximilian Stein
2fa9d7402f Add zsh completion function
* imported from https://github.com/steinymity/aptly-zsh
2018-02-17 17:29:32 +01:00
Andrey Smirnov
e9b2c18e2f Attempt to fix the tests 2017-07-28 22:37:20 +03:00
Andrey Smirnov
1be8d39105 Refactor GPG signer/verifier
Goal is to make it easier to plug in another implementation.
2017-05-23 02:54:56 +03:00
Andrey Smirnov
66b44e68a9 Attempt to workaround Travis "10 minutes without output". 2017-05-03 20:28:57 +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
Andrey Smirnov
47b5cc27c8 Move bash completion to main aptly repo
Fixes #530

Original repository: https://github.com/aptly-dev/aptly-bash-completion
2017-03-28 21:41:57 +03:00
Andrey Smirnov
4707efe4d6 Prepare for new release, update build instructions [ci skip] 2017-03-28 00:15:41 +03:00
Andrey Smirnov
af1adb44ce Remove -x flag for go install 2017-03-26 19:23:53 +03:00
Andrey Smirnov
2943422d5d Automatic versioning for aptly
New version format:

* for releases, `x.y.z` (follows tag without leading `v`)
* for nightly builds, `x.y.z+N+hash` (previous version, not the upcoming one)

This means that each nightly build `aptly` would report
correct version now.

Version is now complied into the aptly binary, system tests
automatically check for current version, no need to update them
anymore.
2017-03-25 00:18:45 +03:00
Andrey Smirnov
516dd7b044 Switch to gometalinter
Only small amount of required checks is enabled,
plan is to enable more linters as issues are fixed in the code.
2017-03-23 01:51:08 +03:00
Andrey Smirnov
11d828b3b1 Add govet/golint into Travis CI build
Fix current issues
2017-03-22 21:49:16 +03:00