<commit_before>require('proof')(7, require('cadence')(prove))

function prove (async, assert) {
    var cadence = require('cadence')
    var bin = require('../../reconfigure.bin'), io
    var http = require('http')
    var Semblance = require('semblance')
    var semblance = new Semblance
    var server = http.createServer(semblance.dispatch())
    var exec = require('child_process').exec
    var ip
    if (process.env.DOCKER_HOST) {
        ip = /^[^\d]+([\d.]+)/.exec(process.env.DOCKER_HOST)[1]
    } else {
        console.log(require('os').networkInterfaces())
        ip = require('os').networkInterfaces().eth0.filter(function (iface) {
            return iface.family == 'IPv4'
        })[0].address
    }

    var dock = cadence(function (async) {
        async([function () {
            exec('docker kill reconfigure-etcd', async())
        }, /kill/, function (error) {
        }], [function () {
            exec('docker rm reconfigure-etcd', async())
        }, /running/, function (error) {
        }])
    })

    async([function () {
        dock(async())
    }], function () {
        exec('docker run -d -p 4001:4001 -p 2380:2380 -p 2379:2379 \
             --name reconfigure-etcd quay.io/coreos/etcd \
             -name reconfigure-etcd \<commit_msg>Update address param fetching in bin test.<commit_after>require('proof')(7, require('cadence')(prove))

function prove (async, assert) {
    var cadence = require('cadence')
    var bin = require('../../reconfigure.bin'), io
    var http = require('http')
    var Semblance = require('semblance')
    var semblance = new Semblance
    var server = http.createServer(semblance.dispatch())
    var exec = require('child_process').exec
    var ip
    if (process.env.DOCKER_HOST) {
        ip = /^[^\d]+([\d.]+)/.exec(process.env.DOCKER_HOST)[1]
    } else {
        var interfaces = require('os').networkInterfaces()

        ip = [].concat.apply([],
                Object.keys(interfaces).map(function (key) { return interfaces[key] }))
            .filter(function (iface) {
                return iface.internal ? false : iface.family == 'IPv4'
            })[0].address
    }
    console.log('Using IPv4 address: ', ip)

    var dock = cadence(function (async) {
        async([function () {
            exec('docker kill reconfigure-etcd', async())
        }, /kill/, function (error) {
        }], [function () {
            exec('docker rm reconfigure-etcd', async())
        }, /running/, function (error) {
        }])
    })

    async([function () {
        dock(async())
    }], function () {
        exec('docker run -d -p 4001:4001 -p 2380:2380 -p 2379:2379 \
             --name reconfigure-etcd quay.io/coreos/etcd \
             -name reconfigure-etcd \
{'fraction_non_alphanumeric': 0.16539162112932604, 'fraction_numerical': 0.021129326047358836, 'mean_word_length': 2.3204353083434097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3791186', 'n_tokens_mistral': 894, 'n_tokens_neox': 834, 'n_words': 181}