Files
aptly/system/t12_api/version.py
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

12 lines
226 B
Python

from api_lib import APITest
import os
class VersionAPITest(APITest):
"""
GET /version
"""
def check(self):
self.check_equal(self.get("/api/version").json(), {'Version': os.environ['APTLY_VERSION']})