Skip to content
Merged
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
4 changes: 3 additions & 1 deletion src/capability-filter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import {
isCapDropSkipped,
filterCapDrop,
filterComposeCapDrop,
LINUX_CAPABILITY_MAP,
testHelpers,
} from './capability-filter';

const { LINUX_CAPABILITY_MAP } = testHelpers;
import { DockerComposeConfig } from './types';
import { generateDockerCompose } from './compose-generator';
import { WrapperConfig } from './types';
Expand Down
6 changes: 5 additions & 1 deletion src/capability-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getLocalDockerEnv } from './docker-host';
* Map of standard Linux capability names (uppercase, without CAP_ prefix) to bit positions in CapBnd.
* Reference: Linux kernel include/uapi/linux/capability.h
*/
export const LINUX_CAPABILITY_MAP: Record<string, number> = {
const LINUX_CAPABILITY_MAP: Record<string, number> = {
CHOWN: 0,
DAC_OVERRIDE: 1,
DAC_READ_SEARCH: 2,
Expand Down Expand Up @@ -164,3 +164,7 @@ export function filterComposeCapDrop(
}
return composeConfig;
}

/** @internal Exposed for unit tests only. */
// ts-prune-ignore-next
export const testHelpers = { LINUX_CAPABILITY_MAP };
Loading