Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Investigate the 34 failing tests and then investigate why it never ends, at packages/truffle, after the upgrade to v4.x #6448

@Muhammad-Altabba

Description

@Muhammad-Altabba

Investigate in the branch of ConsenSys-archive/truffle#5393

To reproduce

remove the .only from describe.only at packages/truffle/test/scenarios/resolver/resolver.js. The run:

yarn
cd packages/artifactor
yarn test

Logs

The following will be printed in the console. And the execution never ends (this needs to be investigated after solving the issues):


  141 passing (13m)
  1 pending
  34 failing

  1) Scenarios
       truffle preserve [ @standalone @>=12 ]
         plugin error handling
           throws if recipe in truffle-plugin.json uses an absolute path:

      AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(output.includes("Error: Absolute paths not allowed!"))

      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/scenarios/commands/preserve.js:44:7)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  2) Scenarios
       truffle run [ @standalone ]
         when run with an argument
           with plugins configured
             error handling
               throws error if command in truffle-plugin.json uses an absolute path:

      AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(output.includes("Error: Absolute paths not allowed!"))

      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/scenarios/commands/run.js:90:11)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  3) Scenarios
       Javascript testing
         allows use of isAddress:
     Error: Unknown exit code: 1
      at ChildProcess.<anonymous> (test/scenarios/commandRunner.js:77:18)
      at ChildProcess.emit (node:events:525:35)
      at maybeClose (node:internal/child_process:1100:16)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

  4) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           with existing migration
             runs the migration without throwing:
     Error: Unknown exit code: 1
      at ChildProcess.<anonymous> (test/scenarios/commandRunner.js:77:18)
      at ChildProcess.emit (node:events:525:35)
      at ChildProcess.emit (node:domain:489:12)
      at maybeClose (node:internal/child_process:1100:16)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

  5) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           with existing migration
             includes all statuses:

      AssertionError: expected 0 to equal 7
      + expected - actual

      -0
      +7
      
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:12:12)
      at processImmediate (node:internal/timers:466:21)

  6) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           with existing migration
             includes preAllMigrations status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:17:25)
      at processImmediate (node:internal/timers:466:21)

  7) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           with existing migration
             includes preMigrate status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:24:25)
      at processImmediate (node:internal/timers:466:21)

  8) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           with existing migration
             includes replacing status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:33:25)
      at processImmediate (node:internal/timers:466:21)

  9) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           with existing migration
             includes deployed status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:45:25)
      at processImmediate (node:internal/timers:466:21)

  10) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           with existing migration
             includes postMigrate status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:59:25)
      at processImmediate (node:internal/timers:466:21)

  11) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           with existing migration
             includes lastMigrate status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:66:25)
      at processImmediate (node:internal/timers:466:21)

  12) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           with existing migration
             includes postAllMigrations status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:72:25)
      at processImmediate (node:internal/timers:466:21)

  13) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           without existing migration (i.e. clean slate)
             runs the migration without throwing:
     Error: Unknown exit code: 1
      at ChildProcess.<anonymous> (test/scenarios/commandRunner.js:77:18)
      at ChildProcess.emit (node:events:525:35)
      at ChildProcess.emit (node:domain:489:12)
      at maybeClose (node:internal/child_process:1100:16)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

  14) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           without existing migration (i.e. clean slate)
             includes all statuses:

      AssertionError: expected 0 to equal 7
      + expected - actual

      -0
      +7
      
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:12:12)
      at processImmediate (node:internal/timers:466:21)

  15) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           without existing migration (i.e. clean slate)
             includes preAllMigrations status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:17:25)
      at processImmediate (node:internal/timers:466:21)

  16) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           without existing migration (i.e. clean slate)
             includes preMigrate status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:24:25)
      at processImmediate (node:internal/timers:466:21)

  17) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           without existing migration (i.e. clean slate)
             includes deploying status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:33:25)
      at processImmediate (node:internal/timers:466:21)

  18) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           without existing migration (i.e. clean slate)
             includes deployed status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:45:25)
      at processImmediate (node:internal/timers:466:21)

  19) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           without existing migration (i.e. clean slate)
             includes postMigrate status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:59:25)
      at processImmediate (node:internal/timers:466:21)

  20) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           without existing migration (i.e. clean slate)
             includes lastMigrate status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:66:25)
      at processImmediate (node:internal/timers:466:21)

  21) Scenarios
       truffle migrate --describe-json
         when run on the most basic truffle project with --describe-json
           without existing migration (i.e. clean slate)
             includes postAllMigrations status:
     TypeError: Cannot read properties of undefined (reading 'status')
      at Context.<anonymous> (test/scenarios/migrations/describe-json.js:72:25)
      at processImmediate (node:internal/timers:466:21)

  22) Scenarios
       migrate (dry-run)
         uses the dry-run option:

      AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(output.includes("dry-run"))

      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/scenarios/migrations/dryrun.js:30:5)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  23) Scenarios
       migrate (empty)
         indicates no ETH was spent on migration:
     AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(output.match(/Total cost:\s+0 ETH/))

      at Context.<anonymous> (test/scenarios/migrations/empty.js:33:5)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  24) Scenarios
       migration errors
         errors and stops:
     Error: Timeout of 70000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/maltabba/repos/truffle/packages/truffle/test/scenarios.js)
      at listOnTimeout (node:internal/timers:559:17)
      at processTimers (node:internal/timers:502:7)

  25) Scenarios
       migration errors
         runs from the last successfully completely migration:
     Error: Timeout of 70000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/maltabba/repos/truffle/packages/truffle/test/scenarios.js)
      at listOnTimeout (node:internal/timers:559:17)
      at processTimers (node:internal/timers:502:7)

  26) Scenarios
       migration errors
         runs out of gas correctly:
     Error: Timeout of 90000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/maltabba/repos/truffle/packages/truffle/test/scenarios.js)
      at listOnTimeout (node:internal/timers:559:17)
      at processTimers (node:internal/timers:502:7)

  27) Scenarios
       migration errors
         exposes the reason string if available [ @ganache ]:
     Error: Timeout of 70000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/maltabba/repos/truffle/packages/truffle/test/scenarios.js)
      at listOnTimeout (node:internal/timers:559:17)
      at processTimers (node:internal/timers:502:7)

  28) Scenarios
       migration errors
         errors on insufficient funds correctly [ @ganache ]:

      AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(output.includes("insufficient funds"))

      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/scenarios/migrations/errors.js:117:7)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  29) Scenarios
       migrate (success)
         runs migrations (sync & async/await):
     Error: Unknown exit code: 1
      at ChildProcess.<anonymous> (test/scenarios/commandRunner.js:77:18)
      at ChildProcess.emit (node:events:525:35)
      at ChildProcess.emit (node:domain:489:12)
      at maybeClose (node:internal/child_process:1100:16)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

  30) Scenarios
       migrate (success)
         forces a migration with the -f option:
     Error: Unknown exit code: 1
      at ChildProcess.<anonymous> (test/scenarios/commandRunner.js:77:18)
      at ChildProcess.emit (node:events:525:35)
      at ChildProcess.emit (node:domain:489:12)
      at maybeClose (node:internal/child_process:1100:16)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

  31) Scenarios
       migrate (typescript)
         runs migrations (sync & async/await):

      AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(output.includes(network.address))

      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/scenarios/migrations/typescript.js:52:5)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  32) Scenarios
       Solidity console log [ @standalone ]
         Migration
           MAINNET preventConsoleLogMigration: false:
     AssertionError [ERR_ASSERTION]: Migration should have succeeded!
      at Context.<anonymous> (test/scenarios/solidity_console/printf.js:172:16)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  33) Scenarios
       Solidity Tests
         test with balance
           runs the tests and has the correct balance:

      AssertionError [ERR_ASSERTION]: An error occurred: Error: Unknown exit code: 1
      + expected - actual

      -false
      +true
      
      at /home/maltabba/repos/truffle/packages/truffle/test/scenarios/solidity_testing/solidityTests.js:56:11
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  34) Scenarios
       Stack tracing
         runs tests and produces stacktraces:

      AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(output.includes("StacktraceTest.run1"))

      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/scenarios/stacktracing/stacktrace.js:75:7)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)



Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleHas not received enough activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions