53 Commits

Author SHA1 Message Date
Miguel Pires
e3a857689f tests: add details to more spread tests
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
2024-05-03 09:54:13 +01:00
Sergio Cazzolato
d4a3183155 Merge remote-tracking branch 'upstream/master' into tests-use-snaps-state 2021-07-07 16:04:31 -03:00
Sergio Cazzolato
99ba2f9161 First part of the cleanup
Minor changes to clean up tests and remove old style
2021-06-09 18:03:24 -03:00
Sergio Cazzolato
edad6be209 Move snaps.sh helper to snaps-state and remove not needed uses of snaps.sh
The change includes:
. Start using the tool snaps-state
. Remove includes for snaps.sh
. Cleanup snaps.sh helper
. Update snaps-state too to include repack with target dir
2021-06-02 23:14:45 -03:00
Sergio Cazzolato
9be34ab482 Moving smoke test suite and some tests from main suite to snaps-state tool 2020-09-30 14:41:11 -03:00
Sergio Cazzolato
b2fd998838 tests: new to-one-line tool which replaces the strings.sh helper
The idea of this change is to avoid source strings.sh and create a new
tool to manage strings.

This change also includes a test for the new to-one-line ool
2020-07-20 16:55:20 +02:00
Pawel Stolowski
2ece71ee25 Revert "move and enforce resolveChannel before installInfo"
This reverts commit 4e54b6d8a2.
2019-08-29 12:50:59 +02:00
Pawel Stolowski
f26406a7f5 Revert "tests/install-errors: fix/ignore shellcheck problems"
This reverts commit 9448e21096.
2019-08-29 12:50:15 +02:00
Pawel Stolowski
425162fdd4 Revert "tests/install-errors: remove erroneous quotes"
This reverts commit 701e0a53b5.
2019-08-29 12:49:54 +02:00
Ian Johnson
701e0a53b5 tests/install-errors: remove erroneous quotes
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2019-08-28 10:28:16 -05:00
Ian Johnson
9448e21096 tests/install-errors: fix/ignore shellcheck problems
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2019-08-28 08:37:50 -05:00
Samuele Pedroni
4e54b6d8a2 move and enforce resolveChannel before installInfo
move spread tests to install-errors where they belong
2019-08-28 09:37:59 +02:00
Maciej Borzecki
9e3b3a43f3 cmd/snap, overlord/snapstate: silently ignore classic flag when a snap is strictly confined (#6477)
When installing a strict snap withthe --classic snap like:

    snap install strict-snap --classic 

this should be allowed because the user expresses that he/she is willing to install a classic snap.
If the snap is not classic that is even better and no reason to error (a warning is appropriate to 
ensure the user is not under the misconception that the snap gets installed with classic confinement).

* overlord/snapstate: silently ignore classic flag when installing a non classic snap

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>

* cmd/snap: warn when --classic flag was ignored

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>

* overlord/snapstate: review feedback

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>

* tests/main/install-errors: verify --classic flag for non-classic snaps

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>

* cmd/snap: display warning before snap install summary

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>

* tests/main/install-errors: fix error match

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>

* travis: quote Go version

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2019-02-06 06:35:06 +01:00
Maciej Borzecki
99eab3a0bf tests/main/install-errors: update to match snap error changes
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-11-13 09:27:58 +01:00
Maciej Borzecki
c21e3a2742 tests/main/install-errors: update to match new error message
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-11-09 11:07:38 +01:00
Maciej Borzecki
a960454583 tests/main/install-errors: fix error matching, fix systems not supporting classic
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-10-26 18:20:02 +02:00
Michael Vogt
c6117368b7 snapstate: do not allow classic mode for strict snaps
Right now it is possible to install a strictly confined snap as in
classic confinement mode with:
```
snap install --classic test-snapd-tools
```
This should not work.
2018-10-24 16:43:06 -06:00
sergio-j-cazzolato
5339d217cf Introduce snaps just for edge and beta channels
Changes:
. Using test-snapd-just-{edge,beta} snaps
. Snap test-snapd-only-in-edge replaced (tests udpated)
. searching test updated to search snaps on edge and beta channels
2018-09-17 13:55:55 +02:00
sergio-j-cazzolato
ba2d414e0b Normalize tests
changes:
. Add extra spaces and new lines
. Try to use install_local when possible
. Remove not needed echo
. Re-order test tags
. Use lists for systems
. Replace description tags
. Minor changes on test checks
2018-08-15 12:24:41 -03:00
John R. Lenton
325aca93e7 cmd/snap: check for typographic dashes in command
If somebody copy-pastes a snap command from a blog they might end up
getting something like

    snap install atom ––classic

which looks OK until you realise those are en dashes. The resulting
error will be very hard to understand (even ignoring the fact that the
error itself right now is wrong; that's a separate issue).

This detects the situation and prints a hopefully helpful hint before
the error.
2018-07-17 15:06:08 +01:00
Samuele Pedroni
22e8389ba2 many: use extra "releases" information on store "revision-not-found" errors to produce better errors (#5403)
This uses the new extra "releases" information on store "revision-not-found" errors to produce better errors when a revision is not available for the given channel or architecture.

The extra information when available is passed back over the snapd API using two new error kinds:

* snap-channel-not-available
* snap-architecture-not-available
2018-07-04 13:19:25 +02:00
Zygmunt Krynicki
a1e9b880b9 Merge pull request #5368 from mvo5/tests-core18
tests: disable core tests on all core systems (16 and 18)
2018-06-21 19:28:00 +02:00
Michael Vogt
76ce53cdde tests: disable core tests on all core systems (16 and 18) 2018-06-21 15:26:43 +02:00
Maciej Borzecki
8f977c0a1f tests: fix shellcheck 0.5.0 warnings
ShellCheck 0.5.0 picks up more issues than the 0.4.6 version we currently use in
the tests.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-06-20 14:19:43 +02:00
Maciej Borzecki
a104449ee4 tests: shellchecks part 2
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-05-22 12:46:09 +02:00