heuels / briskhome-irrigation

External component that implements support for custom Arduino-based irrigation controllers.
0 stars 1 forks source link

Failing tests #16

Open heuels opened 7 years ago

heuels commented 7 years ago

Tests for commit 0e685f2 run successfully on BitBucket Pipelines but fail for the same commit on Travis CI & locally.

heuels commented 7 years ago

This is a log from the latest Travis build:

  Irrigation
    #constructor()
null
      ✓ should fail to register job definitions
    #update()
      ✓ should log a warning if database error occurs
      1) should log a warning if no devices are registered
      2) should log a warning if unable to connect to device
      3) should log a warning if unable to parse the response
      4) should log a warning if unable to query circuits
      5) should register a circuit if not registered
      6) should log a warning if unable to query sensors
      7) should register a sensor if not registered
      8) should log a warning if unable to save a sensor
      9) should log a warning if unable to query readings
      - should create a new reading if unable to find recent
      10) should log a warning if unable to save a reading
      11) should log a warning if unable to save a circuit
    #controllers()
Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html
      ✓ should return a controller
      ✓ should return a populated controller
      ✓ should return a model of a controller
      ✓ should return all controllers
      ✓ should return all populated controllers
      ✓ should return all models of controllers
      ✓ should return error if a controller is not registered
      ✓ should return error if no controllers are registered
      ✓ should return error if a database error occurs
    #circuits()
      12) should return a circuit
      13) should return a populated circuit
      14) should return a model of a circuit
      ✓ should return all circuits
      ✓ should return all populated circuits
      ✓ should return all models circuits
      15) should return error if a circuit is not registered
      ✓ should return error if no circuits are registered
      ✓ should return error if a database error occurs
    #start()
      16) should start a circuit
      17) should return error if a circuit is active
      18) should return error if a circuit is disabled
      19) should return error if unable to save circuit
      20) should return error if a database error occurs
      21) should return error if controller is inavailable
    #stop()
      22) should stop a circuit
      23) should return error if circuit is already stopped
      24) should return error if a database error occurs
      25) should return error if unable to save a circuit
      26) should return error if controller is inavailable
    #schedule()
      27) should return error if unable to save start job
      28) should return error if unable to save finish job
      29) should return error if unable to save a timetable
      30) should return error if unable to register a timetable
      31) should register a timetable
      32) should return error if circuit is incorrect
  Bus
    #irrigation:controllers
      33) should return a controller
      34) should return a populated controller
      35) should return all controllers
      36) should return all populated controllers
      ✓ should return error if no controllers are registered
    #irrigation:circuits
      37) should return a circuit
      38) should return a populated circuit
      39) should return all circuits
      40) should return all populated circuits
      41) should return error if no circuits are registered
  Planner
    #irrigation:start
      - should write specs for core.planner module integration
    #irrigation:stop
      - should write specs for core.planner module integration
  17 passing (606ms)
  3 pending
  41 failing

1) Irrigation #update() should log a warning if no devices are registered:
     Uncaught AssertionError: Unspecified AssertionError
      at specs/index.spec.js:230:11
      at index.js:157:16
      at Query.<anonymous> (node_modules/mongoose/lib/model.js:3420:16)
      at node_modules/kareem/index.js:273:21
      at node_modules/kareem/index.js:127:16
      at _combinedTickCallback (internal/process/next_tick.js:67:7)
      at process._tickCallback (internal/process/next_tick.js:98:9)
  2) Irrigation #update() should log a warning if unable to connect to device:
     Uncaught AssertionError: Unspecified AssertionError
      at specs/index.spec.js:243:11
      at index.js:269:16
      at node_modules/async/dist/async.js:356:16
      at iteratorCallback (node_modules/async/dist/async.js:936:13)
      at node_modules/async/dist/async.js:840:16
      at index.js:164:20
      at done (node_modules/needle/lib/needle.js:398:14)
      at OverriddenClientRequest.had_error (node_modules/needle/lib/needle.js:408:5)
      at node_modules/nock/lib/request_overrider.js:206:11
      at _combinedTickCallback (internal/process/next_tick.js:67:7)
      at process._tickCallback (internal/process/next_tick.js:98:9)