• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mongodb-js / mongodb-mcp-server / 16077979285

04 Jul 2025 04:42PM UTC coverage: 73.962% (-0.2%) from 74.187%
16077979285

Pull #340

github

web-flow
Merge e13a3d210 into 5b7ba55e0
Pull Request #340: chore: avoid log files on disk and move them to console for containers

234 of 396 branches covered (59.09%)

Branch coverage included in aggregate %.

10 of 17 new or added lines in 3 files covered. (58.82%)

817 of 1025 relevant lines covered (79.71%)

59.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

58.33
/src/common/container.ts
1
import fs from "fs/promises";
2

3
export async function detectContainerEnv(): Promise<boolean> {
4
    if (process.platform !== "linux") {
46!
NEW
5
        return false; // we only support linux containers for now
×
6
    }
7

8
    if (process.env.container) {
46!
NEW
9
        return true;
×
10
    }
11

12
    const exists = await Promise.all(
46✔
13
        ["/.dockerenv", "/run/.containerenv", "/var/run/.containerenv"].map(async (file) => {
14
            try {
138✔
15
                await fs.access(file);
138✔
NEW
16
                return true;
×
17
            } catch {
18
                return false;
132✔
19
            }
20
        })
21
    );
22

23
    return exists.includes(true);
44✔
24
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc