cpfair / tapiriik

tapiriik keeps your fitness in sync
https://tapiriik.com
Apache License 2.0
1.72k stars 294 forks source link

Upgrade vagrant config to Ubuntu 18.04 and fix mongo 3 incompatibility #519

Open mduggan opened 5 years ago

mduggan commented 5 years ago

This should fix the ability to use vagrant on a fresh checkout. It upgrades to Bionic (18.04).

Travis is showing this as not working, but that's due to the existing problem there - the tests pass when I run them from the local vagrant image, with some minor warnings:

vagrant@vagrant:/vagrant$ python runtests.py
../vagrant/tapiriik/services/interchange.py:151: DeprecationWarning: insert is deprecated. Use insert_one or insert_many instead.
  cachedb.tz_cache.insert(cachedTzData)
Handling streams ['path', 'heart_rate', 'calories']
......................./vagrant/tapiriik/testing/testtools.py:65: DeprecationWarning: insert is deprecated. Use insert_one or insert_many instead.
  db.test.insert({"asd": "asdd"})
        mockA not configured
.       Excluded mockA
./vagrant/tapiriik/auth/__init__.py:206: DeprecationWarning: update is deprecated. Use replace_one, update_one or update_many instead.
  db.users.update({"_id": user["_id"]}, {"$set": {"FlowExceptions": user["FlowExceptions"]}})
        Flow exception for mockB
.       Flow exception for mockA
        Flow exception for mockB
.       Flow exception for mockA
        Flow exception for mockB
        Flow exception for mockB
.       Flow exception for mockA
        Flow exception for mockB
.       Flow exception for mockA
.       Flow exception for mockC
        Flow exception for mockC
......  ...mockB doesn't support type XCSkiing
    ...mockA doesn't support type Cycling
    ...mockA doesn't support type Cycling
.
----------------------------------------------------------------------
Ran 39 tests in 0.405s

OK
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/gc_rate.0.0.0.0.lock' mode='r+' encoding='UTF-8'>
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/m_rate.0.0.0.0.lock' mode='r+' encoding='UTF-8'>
sys:1: ResourceWarning: unclosed <socket.socket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 57890), raddr=('127.0.0.1', 5672)>

I tried to also update .travis.yml config (like #502), but I couldn't get it working - something about the newer ubuntus in travis having an IPV6 localhost record (eg, https://travis-ci.org/mduggan/tapiriik/builds/600559948)

(fixes #491)

klofrau commented 4 years ago

Works for me, thanks a lot!