X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=modules%2Flibjuju%2F.travis.yml;h=5edfef596928bb9cd87bafebd86a1ef6c7b237ad;hp=4389c8e4b8b494cbb4b89ded0c46f8701e2297d3;hb=0cd1c02c85f5dbd6d06bd28b79f964fb209ee90a;hpb=b09436613925b2eb334c10f219b743868e4b3fe5 diff --git a/modules/libjuju/.travis.yml b/modules/libjuju/.travis.yml index 4389c8e..5edfef5 100644 --- a/modules/libjuju/.travis.yml +++ b/modules/libjuju/.travis.yml @@ -18,7 +18,6 @@ install: env: global: > TEST_AGENTS='{"agents":[{"url":"https://api.staging.jujucharms.com/identity","username":"libjuju-ci@yellow"}],"key":{"private":"88OOCxIHQNguRG7zFg2y2Hx5Ob0SeVKKBRnjyehverc=","public":"fDn20+5FGyN2hYO7z0rFUyoHGUnfrleslUNtoYsjNSs="}}' - LXD_PASSWORD="password" PATH="/snap/bin:$PATH" matrix: @@ -32,19 +31,18 @@ matrix: - python: 3.7-dev env: JUJU_CHANNEL=edge before_script: - - sudo lxd waitready --timeout 30 - - sudo lxc storage create default dir - - sudo lxd init --auto --trust-password="${LXD_PASSWORD}" --network-address='[::]' --network-port=8443 + # Run lint before performing more expensive operations (fail fast/early) + - tox -e lint - # I suspect these could be integrated into the lxd init call - - sudo sudo mkdir /var/snap/lxd/common/lxd/storage-pools/juju-zfs - - sudo lxc storage create juju-zfs dir source=/var/snap/lxd/common/lxd/storage-pools/juju-zfs # Horrible workaround to LP Bug #1738614 + # init lxd for tests + - sudo lxd waitready --timeout 30 + - sudo chmod 666 /var/snap/lxd/common/lxd/unix.socket + - lxd init --auto --network-address='[::]' --network-port=8443 --storage-backend=dir - - sudo addgroup lxd || true - - sudo usermod -a -G lxd $USER || true - # Trigger generation of the client certificates - - sg lxd -c "echo y|lxc remote add "$USER" https://0.0.0.0:8443 --accept-certificate --password='${LXD_PASSWORD}'" + # Horrible workaround to LP Bug #1738614 + - sudo mkdir /var/snap/lxd/common/lxd/storage-pools/juju-zfs + - lxc storage create juju-zfs dir source=/var/snap/lxd/common/lxd/storage-pools/juju-zfs script: - - sudo -E sudo -u $USER -E juju bootstrap localhost test --config 'identity-url=https://api.staging.jujucharms.com/identity' --config 'allow-model-access=true' + - juju bootstrap localhost test --config 'identity-url=https://api.staging.jujucharms.com/identity' --config 'allow-model-access=true' - tox -e py3,integration,serial