Commit Graph

14 Commits (3886304c54172deec30033934875a2b3b69ebc92)

Author SHA1 Message Date
Connor Rigby 6704a40c5a
Force farmbot to sync on first boot 2019-12-31 10:32:09 -08:00
Connor Rigby e7ea334ab2
Change Preloading and Caching to use the same system as auto_sync
* preloader and reconciler no longer use a transaction
   * This will prevent rolling back a failed sync, but allows farmbot to
   continue operating if a sync does fail
* usage of the preloader updated to reflect this
2019-09-13 16:03:23 -07:00
Connor Rigby d5215b6608
Handle unknown auto_sync messages
Adds a blacklist of known asset types that FarmBot can
handle and sync/cache. This is important for when new assets are added or
assets are dispatched for the frontend to consume.
2019-09-13 16:03:22 -07:00
Connor Rigby 11220c3697
Refactor Preloader test system
* Gets rid of the Preloader behaviour
  * This prevents the Preloader mock from overriding the _actual_
    implementation.
* Update auto_sync_channel_test to mock the API, not the Preloader
* remove old preloader_test as it didn't do anything
2019-09-13 16:03:22 -07:00
Connor Rigby 7cda16f144
Fix argument order in auto_sync channel 2019-09-13 16:03:22 -07:00
Rick Carlino b619cb3576
Add scafold tests for celery_script_channel
* Test case: `celery_script_channel` `start_link`
2019-09-13 16:03:22 -07:00
Connor Rigby 26578a7ae2
Update `mox` to be used correctly.
I previously misunderstood how the black magic of mox actually works.
This updates `farmbot_ext` to not require setting excess data in every
config.exs entry. Also removes calls to `Application.get_env/2`
2019-09-13 16:03:22 -07:00
Connor Rigby 1483a3881f
Cleanup farmbot_ext auto_sync_channel
Also add some documentation for stubable
modules Query and Command
2019-09-13 16:03:21 -07:00
Connor Rigby 686c9be7c9
Fix process naming colision 2019-09-13 16:03:21 -07:00
Rick Carlino ab9e434da8
Cleanup of auto_sync tests
* Move EagerLoader and friends back into AutoSyncChannel to avoid cross cutting
2019-09-13 16:03:21 -07:00
Rick Carlino c3819359b0
Test auto_sync ignore case
* Test case: auto_sync is disabled.

* Test case: auto_sync of Device assets

* Test case: auto_sync of FbosConfig

* Test case: auto_sync of FbosConfig assets

* Test case: auto_sync of FarmwareInstallation assets

Test case: `cache_sync/3`
2019-09-13 16:03:21 -07:00
Rick Carlino 8c7d6f6608
AutoSyncChannel Testing: Device, `auto_sync = false` (#714)
* Test auto_sync ignore case

* Test case: auto_sync is disabled.

* Test for auto_sync of Device assets
2019-09-13 16:03:21 -07:00
Rick Carlino 4248c93962
Add mox and excoveralls
* and tests for AutoSyncChannel
* add tests for auto sync preloader
2019-09-13 16:03:20 -07:00
Rick Carlino 0c75d61d2d
Add mox, excoveralls and a test for AutoSyncChannel 2019-09-13 16:03:20 -07:00