Skip to content

Commit 460406e

Browse files
authored
Merge pull request #882 from mountebank-testing/mac-build-troubleshooting
Add diagnostic logging to troubleshoot mac builds
2 parents 30c0275 + 9b518bb commit 460406e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

mbTest/cli/hostTest.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,21 @@ describe('--host', function () {
107107
});
108108

109109
it('should disallow localhost calls when bound to specific host', async function () {
110+
// Add diagnostic logging to understand the environment
111+
const dns = require('node:dns').promises;
112+
console.log('\n=== Diagnostic Info ===');
113+
console.log(`Hostname: ${hostname}`);
114+
115+
try {
116+
const resolved = await dns.lookup(hostname);
117+
console.log(`Hostname resolves to: ${resolved.address} (family: ${resolved.family})`);
118+
console.log(`Hostname is localhost: ${resolved.address === '127.0.0.1' || resolved.address === '::1'}`);
119+
}
120+
catch (error) {
121+
console.log(`Hostname does not resolve: ${error.code}`);
122+
}
123+
console.log('======================\n');
124+
110125
await mb.start(['--host', hostname]);
111126

112127
try {

0 commit comments

Comments
 (0)