fix(deploy): prioritize BaoTa-visible container logs

This commit is contained in:
2026-09-02 15:39:58 +08:00
parent 25c4dd50b3
commit 2902ab6077
7 changed files with 20 additions and 18 deletions
+5 -5
View File
@@ -40,10 +40,10 @@ test('deployable applications log only to stdout and stderr', () => {
}
});
test('Compose uses one bounded local log stream without application log mounts', () => {
test('Compose uses one bounded BaoTa-compatible log stream without application log mounts', () => {
for (const path of composeFiles) {
const source = readFileSync(path, 'utf8');
assert.match(source, /driver:\s+local/, path);
assert.match(source, /driver:\s+\$\{DOCKER_LOG_DRIVER:-json-file\}/, path);
assert.match(source, /DOCKER_LOG_MAX_SIZE/, path);
assert.match(source, /DOCKER_LOG_MAX_FILE/, path);
assert.doesNotMatch(source, /LOG_PATH|LOG_ROOT|\/app\/logs/, path);
@@ -58,11 +58,11 @@ test('runtime image does not prepare an application log directory', () => {
assert.doesNotMatch(dockerfile, /\/app\/logs/);
});
test('infrastructure containers also use bounded local logs', () => {
test('infrastructure containers also use bounded BaoTa-compatible logs', () => {
for (const [path, expectedServiceCount] of infrastructureComposeFiles) {
const source = readFileSync(path, 'utf8');
assert.match(source, /x-bounded-logging:\s+&bounded-logging/, path);
assert.match(source, /driver:\s+local/, path);
assert.match(source, /driver:\s+\$\{DOCKER_LOG_DRIVER:-json-file\}/, path);
assert.match(source, /DOCKER_LOG_MAX_SIZE/, path);
assert.match(source, /DOCKER_LOG_MAX_FILE/, path);
assert.equal(
@@ -70,6 +70,6 @@ test('infrastructure containers also use bounded local logs', () => {
expectedServiceCount,
path,
);
assert.doesNotMatch(source, /driver:\s+json-file/, path);
assert.doesNotMatch(source, /driver:\s+local/, path);
}
});