Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ flowchart LR
- 🔄 **Automated Container Updates**
Automatically pull new images and recreate containers on demand (Docker, Docker Compose, Nomad).
- ⚡ **Registry Webhooks**: [Registry push notifications](website/docs/configuration/registries/webhooks.md), including GitLab Self-Managed, immediately check matching watched images while preserving existing labels and trigger policies.
- 🔎 **Central Digest Configuration**: [Enable digest watching for selected Docker containers](website/docs/configuration/watchers/README.md#central-digest-configuration) by name with `CONTAINERDIGESTS`, while preserving container label precedence.
- 🏷️ **SemVer & Tag Filtering**
Flexible versioning strategies: target `semver` (major, minor, patch), match custom regular expressions, pin versions, or define include/exclude tag rules.
- 🖥️ **Interactive Web UI & REST API**
Expand Down
22 changes: 22 additions & 0 deletions app/configuration/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// @ts-nocheck
import * as configuration from './index';
import fs from 'fs';
import os from 'os';
import path from 'path';

test('getVersion should return wud version', async () => {
configuration.wudEnvVars.WUD_VERSION = 'x.y.z';
Expand Down Expand Up @@ -206,3 +209,22 @@ test('getAuthenticationConfigurations should return auth providers and exclude r
delete configuration.wudEnvVars.WUD_AUTH_SESSION_SECRET;
delete configuration.wudEnvVars.WUD_AUTH_OIDC_DISCOVERY;
});

test('watcher digest JSON is preserved through __FILE and environment parsing', () => {
const directory = fs.mkdtempSync(
path.join(os.tmpdir(), 'wud-container-digests-'),
);
const file = path.join(directory, 'digests.json');
const value =
'{"Service-A":{"watchdigest":true},"db":{"watchdigest":false}}';
try {
fs.writeFileSync(file, `${value}\n`);
const variables = { WUD_WATCHER_LOCAL_CONTAINERDIGESTS__FILE: file };
configuration.replaceSecrets(variables);
expect(configuration.get('wud.watcher', variables)).toEqual({
local: { containerdigests: value },
});
} finally {
fs.rmSync(directory, { recursive: true });
}
});
Loading