Skip to content

Commit 98f0c6d

Browse files
author
chadcarlson
committed
add connection test
1 parent f1ef73c commit 98f0c6d

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

test/testdata/PLATFORM_RELATIONSHIPS.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,18 @@
5252
"hostname" : "dg3c6xro44gl5tuxqbqf5flvhu.solr.service._.eu-3.platformsh.site",
5353
"scheme" : "solr"
5454
}
55+
],
56+
"headless": [
57+
{
58+
"service": "headless",
59+
"ip": "169.254.16.215",
60+
"hostname": "vjteswvo72bpyb33rgijkpooja.headless.service._.eu-3.platformsh.site",
61+
"cluster": "moqwtrvgc63mo-pr-5-kehpj4q",
62+
"host": "headless.internal",
63+
"rel": "http",
64+
"scheme": "http",
65+
"type": "chrome-headless:73",
66+
"port": 9222
67+
}
5568
]
5669
}

test/tests.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,17 @@ describe("Config tests", () => {
345345
});
346346
});
347347

348+
it('formatts a puppeteer connection', () => {
349+
let c = new psh.Config(mockEnvironmentRuntime);
348350

349-
});
351+
let formatted = c.formattedCredentials('headless', 'puppeteer')
352+
353+
assert.deepEqual(formatted, {
354+
host: 'headless.internal',
355+
port: 9222,
356+
ip: "169.254.16.215"
357+
});
358+
});
359+
});
350360

351361
});

0 commit comments

Comments
 (0)