UNPKG

dockest

Version:

Dockest is an integration testing tool aimed at alleviating the process of evaluating unit tests whilst running multi-container Docker applications.

19 lines 824 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.bridgeNetworkExists = void 0; const constants_1 = require("../../constants"); const logger_1 = require("../../logger"); const execa_wrapper_1 = require("../execa-wrapper"); const bridgeNetworkExists = async () => { const command = `docker network ls \ --filter driver=bridge --filter name=${constants_1.BRIDGE_NETWORK_NAME} \ --quiet`; const networkExists = !!(0, execa_wrapper_1.execaWrapper)(command).stdout.trim(); if (networkExists) { logger_1.Logger.info(`Using existing network "${constants_1.BRIDGE_NETWORK_NAME}"`); } return networkExists; }; exports.bridgeNetworkExists = bridgeNetworkExists; //# sourceMappingURL=bridge-network-exists.js.map