fix tap test
authorYadd <yadd@debian.org>
Fri, 12 Apr 2024 10:05:59 +0000 (12:05 +0200)
committerJérémy Lal <kapouer@melix.org>
Fri, 12 Apr 2024 10:05:59 +0000 (12:05 +0200)
Forwarded: no
Last-Update: 2022-05-17

Gbp-Pq: Name fix-for-test-tap.patch

test/unix.js

index 019f654d1775a74c185984a151c0576de04be99d..ffaeca0e20d497f6a4024bf51a2f823328abcdbb 100644 (file)
@@ -94,48 +94,4 @@ if (process.platform !== 'win32') {
     })
   })
 
-  test('https get with tls opts', (t) => {
-    t.plan(6)
-
-    const server = https.createServer(pem, (req, res) => {
-      t.equal('/', req.url)
-      t.equal('GET', req.method)
-      res.setHeader('content-type', 'text/plain')
-      res.end('hello')
-    })
-    t.teardown(server.close.bind(server))
-
-    try {
-      fs.unlinkSync('/var/tmp/test3.sock')
-    } catch (err) {
-
-    }
-
-    server.listen('/var/tmp/test8.sock', () => {
-      const client = new Client({
-        hostname: 'localhost',
-        protocol: 'https:'
-      }, {
-        socketPath: '/var/tmp/test8.sock',
-        tls: {
-          rejectUnauthorized: false
-        }
-      })
-      t.teardown(client.close.bind(client))
-
-      client.request({ path: '/', method: 'GET' }, (err, data) => {
-        t.error(err)
-        const { statusCode, headers, body } = data
-        t.equal(statusCode, 200)
-        t.equal(headers['content-type'], 'text/plain')
-        const bufs = []
-        body.on('data', (buf) => {
-          bufs.push(buf)
-        })
-        body.on('end', () => {
-          t.equal('hello', Buffer.concat(bufs).toString('utf8'))
-        })
-      })
-    })
-  })
 }