Skip to content

Test 'ncp / error / dest-permission' / 'should return an error:' fails inside a container #898

@dcermak

Description

@dcermak
  • Operating System: openSUSE Tumbleweed, Fedora 33, Ubuntu
  • Node.js version: 15, 16
  • fs-extra version: git head

I am currently trying to run the unit tests of node-fs-extra in a container, but sadly the ncp / error / dest-permission / should return an error: test fails consistently with:

  1) ncp / error / dest-permission
       should return an error:
     Uncaught AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(err)

      at /node-fs-extra/lib/copy/__tests__/ncp/ncp-error-perm.test.js:45:7
      at /node-fs-extra/node_modules/graceful-fs/polyfills.js:247:20
      at FSReqCallback.oncomplete (node:fs:184:23)

How to reproduce:

$ podman run --rm -it node /bin/bash
# git clone https://github.com/jprichardson/node-fs-extra.git
Cloning into 'node-fs-extra'...
remote: Enumerating objects: 5760, done.
remote: Counting objects: 100% (135/135), done.
remote: Compressing objects: 100% (102/102), done.
remote: Total 5760 (delta 56), reused 83 (delta 31), pack-reused 5625
Receiving objects: 100% (5760/5760), 1.17 MiB | 10.03 MiB/s, done.
Resolving deltas: 100% (3511/3511), done.
root@950ba24c05d3:/# cd node-fs-extra/
root@950ba24c05d3:/node-fs-extra# npm install
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

added 426 packages, and audited 427 packages in 15s

51 packages are looking for funding
  run `npm fund` for details

3 low severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 7.10.0 -> 7.11.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.11.2
npm notice Run npm install -g [email protected] to update!
npm notice
root@950ba24c05d3:/node-fs-extra# npm run unit

> [email protected] unit
> node test.js



  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․,․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․,․․․․․․․․․․․․․․․․․․․․․․․․․․․․․!․․․․․․․․․․․

  695 passing (8s)
  2 pending
  1 failing

  1) ncp / error / dest-permission
       should return an error:
     Uncaught AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(err)

      at /node-fs-extra/lib/copy/__tests__/ncp/ncp-error-perm.test.js:45:7
      at /node-fs-extra/node_modules/graceful-fs/polyfills.js:247:20
      at FSReqCallback.oncomplete (node:fs:184:23)



npm notice
npm notice New minor version of npm available! 7.10.0 -> 7.11.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.11.2
npm notice Run npm install -g [email protected] to update!
npm notice

I have tried this on Fedora and openSUSE Tumbleweed hosts, with docker and podman and with multiple container images. I am not really familiar with the code, but my guess is that a different failure occurs inside a container in contrast to a bare metal system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions