Mock Version: 2.2 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/nodejs-proxyquire.spec'], chrootPath='/var/lib/mock/epel-8-x86_64-1589099965.942375/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.356rnr8z:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.356rnr8z:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '223e946779034f84bc9bb0f9b4b54414', '-D', '/var/lib/mock/epel-8-x86_64-1589099965.942375/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.356rnr8z:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/nodejs-proxyquire.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0'} and shell False Building target platforms: x86_64 Building for target x86_64 Wrote: /builddir/build/SRPMS/nodejs-proxyquire-2.0.1-6.el8.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/nodejs-proxyquire.spec'], chrootPath='/var/lib/mock/epel-8-x86_64-1589099965.942375/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.356rnr8z:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.356rnr8z:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '6bea361ba7074de6bc8908378bce0a9f', '-D', '/var/lib/mock/epel-8-x86_64-1589099965.942375/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.356rnr8z:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/nodejs-proxyquire.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0'} and shell False Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.oq6fKV + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf package + /usr/bin/gzip -dc /builddir/build/SOURCES/proxyquire-2.0.1.tgz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd package + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/bin/cat /builddir/build/SOURCES/nodejs-proxyquire-helloworld.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch + /usr/lib/rpm/nodejs-fixdep resolve '^1.1.7' + rm -rf node_modules + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.KBQJP3 + umask 022 + cd /builddir/build/BUILD + cd package + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.nYxAVb + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64 '!=' / ']' + rm -rf /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64 ++ dirname /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64 + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64 + cd package + mkdir -p /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64/usr/lib/node_modules/proxyquire + cp -pr package.json index.js lib /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64/usr/lib/node_modules/proxyquire + /usr/lib/rpm/nodejs-symlink-deps /usr/lib/node_modules + /usr/lib/rpm/find-debuginfo.sh -j2 --strict-build-id -m -i --build-id-seed 2.0.1-6.el8 --unique-debug-suffix -2.0.1-6.el8.x86_64 --unique-debug-src-base nodejs-proxyquire-2.0.1-6.el8.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -S debugsourcefiles.list /builddir/build/BUILD/package find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig /sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile 1 + /usr/lib/rpm/brp-python-hardlink + PYTHON3=/usr/libexec/platform-python + /usr/lib/rpm/redhat/brp-mangle-shebangs Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.gmwmnk + umask 022 + cd /builddir/build/BUILD + cd package + /usr/lib/rpm/nodejs-symlink-deps /usr/lib/node_modules --check + /usr/lib/node_modules/mocha/bin/mocha api default export ✓ proxyquire can load ✓ proxyquire can callThru and then load ✓ proxyquire can noCallThru and then load Illegal parameters to resolve give meaningful errors when I pass no request ✓ throws an exception explaining that a request path must be provided when I pass an object as a request ✓ throws an exception explaining that request needs to be a requirable string when I pass no stubs ✓ throws an exception explaining that resolve without stubs makes no sense when I pass a string as stubs ✓ throws an exception explaining that stubs need to be an object when I pass an undefined stub ✓ throws an exception with the stub key Proxyquire load() ✓ defaults to preserving the cache ✓ does not pollute the cache when module is proxyquired before it is loaded preserveCache() ✓ returns a reference to itself, so it can be chained ✓ has Proxyquire restore the cache for the module ✓ allows Singletons to function properly noPreserveCache() ✓ returns a reference to itself, so it can be chained ✓ forces subsequent requires to reload the proxied module ✓ deletes the require.cache for the module being stubbed ✓ deletes the require.cache for the stubs ✓ silences errors when stub lookups fail when I try to use compat mode ✓ should let me know that I need to fix my code or downgrade when I require stubs with different extensions ✓ intercepts [] object ✓ intercepts [] function ✓ intercepts [.json] object ✓ intercepts [.node] object global flags set ✓ should override require globally ✓ should override require globally even when require's execution is deferred global flags not set ✓ should not override require globally ✓ should not override require globally even when require's execution is deferred Multiple requires of same module don't affect each other Given I require foo stubbed with bar1 as foo1 and foo stubbed with bar2 as foo2 ✓ foo1.bigBar() == "BAR1" ✓ foo2.bigBar() == "BAR2" and I change bar1.bar() to return barone ✓ foo1.bigBar() == "BARONE" ✓ foo2.bigBar() == "BAR2" Given foo requires the boof, foonum and foobool modules and boof is a string, foonum is a Number and foobool is a bool When I resolve foo with boofber stub as boof. ✓ foo is required 1 times foo's boof is boofber ✓ foo.boof == boofber When I resolve foo with foonumber stub as foonum. ✓ foo is required 1 times foo's foonum is foonumber ✓ foo.foonum == foonumber When I resolve foo with fooboolber stub as foobool. ✓ foo is required 1 times foo's foobool is fooboolber ✓ foo.foobool == fooboolber When I resolve foo with ./fooarray stub as fooarray. ✓ foo is required 1 times foo's fooarray is fooarray ✓ foo.fooarray is fooarray When I resolve foo with ./fooarray stub as empty. ✓ foo is required 1 times foo's fooarray is the original ✓ foo.fooarray is empty When I resolve foo with ./fooarray stub as empty with @noCallThru. ✓ foo is required 1 times foo's fooarray is empty ✓ foo.fooarray is empty When resolving foo that requires stubbed /not/existing/bar.json ✓ throws an error When resolving foo that requires stubbed /not/existing/bar.json with noCallThru ✓ resolves foo with stubbed bar When requiring relative paths, they should be relative to the proxyrequired module ✓ should return the correct result When resolving foo that requires nulled file package ✓ throws an error When resolving foo that optionally requires nulled crypto package ✓ catches when resolving crypto When resolving foo that requires bar and stubbed baz where bar requires unstubbed baz ✓ does not stub baz in bar ✓ does not affect a normal baz import Given foo requires the bar and path modules and bar.bar() returns "bar" When I resolve foo with no overrides to bar as foo and resolve foo with barber stub as foober. ✓ foo is required 2 times foo's bar is unchanged ✓ foo.bigBar() == "BAR" only stubbed modules have overrides in foober ✓ foober.bigBar() == "BARBER" ✓ foober.bigExt("/folder/test.ext") == ".EXT" ✓ foober.bigBas("/folder/test.ext") == "TEST.EXT" when I override keys of stubs after resolve ✓ overrides behavior when module is required inside function call ✓ overrides behavior when module is required on top of file and then delete overrides of stubs after resolve ✓ reverts to original behavior when module is required inside function call ✓ doesn't properly revert to original behavior when module is required on top of file When foo.bigExt() returns capitalized path.extname and foo.bigBas() returns capitalized path.basename and path.extname(file) is stubbed to return "override " + file and callThru was not changed globally or for path module ✓ foo.bigExt(file) == "OVERRIDE /FOLDER/TEST.EXT" ✓ foo.bigBas(file) == "TEST.EXT" and callThru is turned off for path module ✓ foo.bigExt(file) == "OVERRIDE /FOLDER/TEST.EXT" ✓ foo.bigBas(file) throws and callThru was turned off globally and not changed for path module ✓ foo.bigExt(file) == "OVERRIDE /FOLDER/TEST.EXT" ✓ foo.bigBas(file) throws and turned back on for path module ✓ foo.bigExt(file) == "OVERRIDE /FOLDER/TEST.EXT" ✓ foo.bigBas(file) == "TEST.EXT" and turned back on globally ✓ foo.bigExt(file) == "OVERRIDE /FOLDER/TEST.EXT" ✓ foo.bigBas(file) == "TEST.EXT" 69 passing (453ms) + exit 0 Processing files: nodejs-proxyquire-2.0.1-6.el8.noarch Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.KnRPIu + umask 022 + cd /builddir/build/BUILD + cd package + DOCDIR=/builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64/usr/share/doc/nodejs-proxyquire + export LC_ALL=C + LC_ALL=C + export DOCDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64/usr/share/doc/nodejs-proxyquire + cp -pr README.md /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64/usr/share/doc/nodejs-proxyquire + cp -pr examples /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64/usr/share/doc/nodejs-proxyquire + exit 0 Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.b8QF5E + umask 022 + cd /builddir/build/BUILD + cd package + LICENSEDIR=/builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64/usr/share/licenses/nodejs-proxyquire + export LC_ALL=C + LC_ALL=C + export LICENSEDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64/usr/share/licenses/nodejs-proxyquire + cp -pr LICENSE /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64/usr/share/licenses/nodejs-proxyquire + exit 0 Provides: nodejs-proxyquire = 2.0.1-6.el8 npm(proxyquire) = 2.0.1 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: (npm(fill-keys) >= 1.0.2 with npm(fill-keys) < 2) (npm(module-not-found-error) >= 1.0.0 with npm(module-not-found-error) < 2) (npm(resolve) >= 1.1.7 with npm(resolve) < 2) nodejs(engine) Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64 Wrote: /builddir/build/RPMS/nodejs-proxyquire-2.0.1-6.el8.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.zIMM0P + umask 022 + cd /builddir/build/BUILD + cd package + /usr/bin/rm -rf /builddir/build/BUILDROOT/nodejs-proxyquire-2.0.1-6.el8.x86_64 + exit 0 Child return code was: 0