mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-14 09:57:16 +00:00
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.
This commit is contained in:
1 parent
f29449db14
commit
59bf4501e8
8 files changed
+47
-13
No files matched your search
+12
-3
@@ -133,9 +133,17 @@ class BaseTest(object):
|
||||
aptlyDir = ".aptly"
|
||||
aptlyConfigFile = ".aptly.conf"
|
||||
expectedCode = 0
|
||||
databaseEtcd = os.environ.get("APTLY_ETCD_DATABASE")
|
||||
if databaseEtcd is None:
|
||||
databaseEtcd = ""
|
||||
databaseType = os.environ.get("APTLY_DATABASE_TYPE")
|
||||
databaseUrl = os.environ.get("APTLY_DATABASE_URL")
|
||||
if databaseType is None:
|
||||
databaseType = ""
|
||||
if databaseUrl is None:
|
||||
databaseUrl = ""
|
||||
|
||||
databaseBackend = {
|
||||
"type": databaseType,
|
||||
"url": databaseUrl,
|
||||
}
|
||||
|
||||
configFile = {
|
||||
"rootDir": f"{os.environ['HOME']}/{aptlyDir}",
|
||||
@@ -157,6 +165,7 @@ class BaseTest(object):
|
||||
"logFormat": "default",
|
||||
"serveInAPIMode": True,
|
||||
"databaseEtcd": databaseEtcd,
|
||||
"databaseBackend": databaseBackend,
|
||||
}
|
||||
configOverride = {}
|
||||
environmentOverride = {}
|
||||
|
||||
Reference in new issue
Block a user