From e8dd707c38e269d83e477f8d50cd3181b0fe9db3 Mon Sep 17 00:00:00 2001 From: Jurre Stender Date: Mon, 25 Oct 2021 12:46:25 +0200 Subject: [PATCH] Verify the proxy has only the internal/external networks attached --- __tests__/proxy-integration.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/__tests__/proxy-integration.test.ts b/__tests__/proxy-integration.test.ts index bf6ddee..ae4e69b 100644 --- a/__tests__/proxy-integration.test.ts +++ b/__tests__/proxy-integration.test.ts @@ -59,6 +59,12 @@ describe('ProxyBuilder', () => { expect(networkInfo.Name).toBe('dependabot-job-1-internal-network') expect(networkInfo.Internal).toBe(true) + const networkNames = Object.keys(containerInfo.NetworkSettings.Networks) + expect(networkNames).toEqual([ + 'dependabot-job-1-external-network', + 'dependabot-job-1-internal-network' + ]) + // run a bash command that executes docker and returns contents of /config.json const id = proxy.container.id const proc = spawnSync('docker', ['exec', id, 'cat', '/config.json'])