MCPcopy Index your code
hub / github.com/apocas/dockerode / handler

Function handler

test/util.js:74–92  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

72 this.timeout(60000);
73
74 function handler(stream) {
75 expect(stream).to.be.ok;
76
77 const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'dockerode-'));
78 const z = zlib.createGunzip();
79
80 stream
81 .pipe(z)
82 .pipe(tar.extract(tmp), { end: true })
83 .on('finish', function () {
84 const files = fs.readdirSync(tmp);
85
86 expect(files.length).to.be.equal(2);
87 expect(files).to.have.members(['Dockerfile', 'MC-hammer.txt']);
88
89 fs.rm(tmp, { recursive: true });
90 done();
91 });
92 }
93
94 util.prepareBuildContext({
95 context: path.join(__dirname, 'fixtures', 'dockerignore'),

Callers

nothing calls this directly

Calls 1

doneFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…