Skip to content

Commit

Permalink
tests: updated the documentation to run spread tests using external b…
Browse files Browse the repository at this point in the history
…ackend (#11341)

* Updated the documentation to run spread tests using external backend

Also some lines were removed

* Update tests/external-backend.md

Co-authored-by: Maciej Borzecki <[email protected]>

Co-authored-by: Maciej Borzecki <[email protected]>
  • Loading branch information
sergiocazzolato and bboozzoo authored Feb 7, 2022
1 parent 05eadd8 commit 2cdee3d
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions tests/external-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,15 @@ $ export SPREAD_EXTERNAL_ADDRESS=<instance_ip>:<instance_port>
* From the snapd project's root execute the script to setup ssh access to the
instance:
```
$ ./tests/lib/external/prepare-ssh.sh <instance_ip> <instance_port>
$ ./tests/lib/external/prepare-ssh.sh <instance_ip> <instance_port> <launchpad_id>
```
The default values for ip and port are `localhost`, `8022`. This script assumes that
the user created by console-conf has the same name as the user executing the
script, if that's not the case you can pass the created username as a third argument
to the script.

* From the snapd project's root execute the suite selecting the type of system of
the instance, currently `ubuntu-core-16-64`, `ubuntu-core-16-32`, `ubuntu-core-16-arm-32` and `ubuntu-core-16-arm-64` are supported:
the instance (spread.yaml file lists all supported systems) by executing the command:
```
$ spread -v -reuse external:ubuntu-core-16-64
```
* You can execute again the suite by just reissuing the spread command, no need
to run the prepare script again.

Suppose a new core revision is published and you want to check if the core snap from stable
can be safely refreshed to this new revision. Then, assuming you have a ubuntu-core instance
created from the stable channel and the new core has been published to `<core_channel>` you
can run the `tests/main/core-snap-refresh` like this:
```
$ export SPREAD_EXTERNAL_ADDRESS=<instance_ip>:<instance_port>
$ ./tests/lib/external/prepare-ssh.sh <instance_ip> <instance_port>
$ export SPREAD_NEW_CORE_CHANNEL=<core_channel>
$ spread -v -reuse external:ubuntu-core-16-64:tests/main/core-snap-refresh
$ spread external:ubuntu-core-20-64
```

0 comments on commit 2cdee3d

Please sign in to comment.