Commit Graph

170 Commits

Author SHA1 Message Date
Carlos Nihelton e88eb7334f Avoiding grep 2021-11-09 09:42:57 -03:00
Carlos Nihelton 8f4a6927bb Enables preserving existing container instances.
- Useful for develop env.
- Mimics the CI while avoiding downloading images all the time.
- Instance names change from 'tester' to the Ubuntu release adjective.
- lxc will only download if there is no local instance with that name.
- Useful for preserving matrix build instances.
2021-11-08 19:20:44 -03:00
Dan Bungert a67b9d18dc scripts: add kvm-test
Updated version of the kvm-test script shown previously.
2021-11-04 17:32:52 -06:00
Michael Hudson-Doyle 4fa0e22b58 create a helper class for invoking curtin 2021-11-03 15:28:26 +13:00
Didier Roche 8b996f9ba5
Merge pull request #1100 from canonical/wsl_oobe_adduser_tests
WSL OOBE: add `useradd` tests
2021-10-20 09:33:46 +02:00
Patrick Wu a3fce9f9c2
system_setup: add useradd tests 2021-10-20 00:27:10 +08:00
Dan Bungert 8da3df2cd2 schema: remove timezones, and tz schema check 2021-10-19 10:06:01 -06:00
Patrick Wu ec04a6833a
system_setup: shutdown/reboot tests 2021-10-18 17:15:45 +08:00
Dan Bungert 39b3394047 runtests: fail on detected crash
* exit if a crash is detected
* intentionally not cleanup on exit, to make it easier to analyze
2021-10-12 17:17:05 -06:00
Didier Roche deab1b0859
Merge pull request #1091 from canonical/wsl_oobe_autoinstall
WSL OOBE - properly setup autoinstall
2021-10-11 09:34:59 +02:00
Patrick Wu 7ae8e108a6
system_setup: include full autoinstall system 2021-10-11 10:20:18 +08:00
Michael Hudson-Doyle 206b7ae678
Merge pull request #1092 from dbungert/source-catalog-tests
sources: add sample source catalog
2021-10-11 12:09:25 +13:00
Dan Bungert a9bf5e004b sources: add sample source catalog
* Add sample source catalog from impish iso
* Show in dryrun
* Use in one of the runtests invocations (but not really tested yet)
2021-10-08 13:02:55 -06:00
Patrick Wu 07b0407815
system_setup: refactor the testing system
1. updating testing system with the proper autoinstall schema
2. reconf mode testing included
2021-10-08 20:49:06 +08:00
Dan Bungert 3b6b89c5d9 storage/v2: create api test 2021-10-06 18:44:22 -06:00
Dan Bungert 92500bf8c9 storage/v2: start using -1 for 'rest of disk' 2021-10-06 18:44:22 -06:00
Dan Bungert 69873d8ab2 storage/v2: test cleanup 2021-10-06 18:44:22 -06:00
Dan Bungert 7f22e91cb3 storage/v2: add api test 2021-10-06 18:44:22 -06:00
Dan Bungert e14febd709
Merge pull request #1082 from dbungert/pytest-3
unittest: use pytest-3
2021-10-05 17:42:22 -06:00
Dan Bungert b757b0f972 unittest: use pytest-3
pytest-3 lets us set exclude directories, which is helpful with the
desired API testing to seperate them from 'unittest discover' so that we
can keep unit test runtime short.
2021-10-05 17:36:54 -06:00
Dan Bungert 8092b3405b slimy: python 3.8 2021-10-05 12:27:47 -06:00
Jean-Baptiste Lallement 4a2f2af268 Run WSL tests on 20.04+
The behaviour of python regarding asynchronous packages changed between
18.04 and 20.04+. OOBE is only supported on 20.04 and higher and there
is no point in making the WSL specific code compatible with ealier
releases than 20.04

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-28 09:32:39 +02:00
Jean-Baptiste Lallement 4966173d6c Test system setup autoinstall
It also adds an argument --ignore-tz to the schema comparison test to
not fail on system where the schema has no TZ like WSL.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-28 09:32:39 +02:00
fheimes f6154d9129
Update zdev-generate.py
adjusted whitespaces
2021-09-25 20:09:54 +02:00
fheimes 913436c77a
Update zdev-generate.py
Adding "--quiet" as additional option to "lszdev" - here more for the reason of completeness and for consistency reasons.
The relevant change for solving LP#1944516 is the change in subiquity/server/controllers/zdev.py
2021-09-24 20:01:31 +02:00
Dan Bungert 525060be16 runtests: misc cleanup
* remove a stray space
* remove an extra call to check-yaml-fields.py, which can accept a list
  of directives
* remove an entire redundant autoinstall run that I added as part of
  bitlocker work but isn't actually verified in any way other than not
  timing out
2021-09-20 16:46:23 -06:00
Jean-Baptiste Lallement b0299f255f Added integration test for WSL
This tests covers the configuration of WSL on first boot.
2021-08-31 15:52:03 +02:00
Michael Hudson-Doyle d1cc1cf593 make the snaps produced by slimy-update-snap.sh pass review
I mean we /probably/ shouldn't be using the snaps this makes for
anything serious but it can be useful for testing emergency fixes...
2021-08-24 11:43:24 +12:00
Michael Hudson-Doyle a29d14a3f1 unset GIT_DIR in update-part.py
Otherwise very confusing things happen (it turns out GIT_DIR is set when
running an exec command during rebase).
2021-08-19 17:12:16 +12:00
Dan Bungert ee38a4506f deps: +build-essential 2021-08-10 13:14:08 -06:00
Dan Bungert ffc4bbde0a runtests support - first API test, has_bitlocker 2021-08-09 10:41:54 -06:00
Michael Hudson-Doyle 88384f0a98 have slimy-update-snap.sh update curtin in the snap too
Also tweak scripts/update-part.py to work better when switching
repositories.
2021-08-05 10:46:39 +12:00
Michael Hudson-Doyle 9e0f11c02e update quick-test-this-branch.sh too 2021-07-21 10:42:25 +12:00
Michael Hudson-Doyle 9a4871f416 use livefs-editor to make customized isos
a while ago I rewrote inject-subiquity-snap in python, generalized it
and put it at https://github.com/mwhudson/livefs-editor.  TBH, it's
always been better than the shell version but now there's a reason to
switch to it: the impish live server ISO use layers, which the current
shell scripts do not support and livefs-editor now does.
2021-07-19 14:44:27 +12:00
Dan Bungert c79aa602dc Proper fix for setting timezone inappropriately in dryrun
Reenable integration test for set of timezone.
Don't set it while in dryrun.
2021-07-15 10:49:32 -06:00
Michael Hudson-Doyle 545d77eeab
Merge pull request #1006 from mwhudson/lp-1936248
fix "make check" on uefi systems
2021-07-15 13:18:46 +12:00
Dan Bungert 4ed4e51a2e Workaround dryrun test actually setting timezone
Until a proper fix can be finished, remove the set of timezone from the
integration tests.
2021-07-14 19:02:42 -06:00
Michael Hudson-Doyle 18c651343d fix "make check" on uefi systems
an ESP can be on a RAID now. Also always run the integration tests in UEFI mode.
2021-07-15 08:49:10 +10:00
Dan Bungert 9f1478cd96
Add new schema comparison, robust to timezone changes (#1002)
* Add new schema comparison, robust to timezone changes

Improve the schema comparison - mostly I'm worried about the
non-timezone items, spot check the timezone list for a few that should
be there.

* Incorporate feedback - pop
2021-07-13 18:13:46 -06:00
Dan Bungert 502c1193fd
Temp disable schema check on Impish (#1000)
Impish is adding more timezones, which is cool, but breaks my schema
check, so disable this there for now and come back later with a better
answer.

Also schema check seems to need curtin.
2021-07-13 11:17:55 -06:00
Dan Bungert 40945f1823
TimeZone: autoinstall and API (FR-1184) (#986)
* TimeZone: autoinstall and API

Add support for Get/Set timezone methods.  Get means that we inquire
with GeoIP as to which timezone is suggested.  Non-availability of
GeoIP, or a previous explicit Set, means that we return the system
timezone.  Set of timezone by Post results in set of the live system
timzeone, and queuing a set of the target system by way of cloud-init.

* Add clarifying comment about _request.
2021-07-13 06:25:03 -06:00
Michael Hudson-Doyle cf931f673f update script to update exsting checkout 2021-07-05 09:23:39 +12:00
Michael Hudson-Doyle f9410e4e86 install probert and curtin via Makefile for testing
rather than pip or apt respectively
2021-07-02 13:49:40 +12:00
Michael Hudson-Doyle 50ce450f2a add a gitdeps target to Makefile that checks out probert and curtin
This uses a silly python script to get the exact version that the
snapcraft.yaml specifies.
2021-07-02 13:48:49 +12:00
Dan Bungert 90b1bb9eed
Refactor - drop external_temp_file (#985)
Move unattended-upgrades to part of postinstall, so it can be done
before the restore_apt_config umount, which lets us get rid of the
redundant external_temp_file logic.
2021-06-28 17:11:49 -06:00
Michael Hudson-Doyle 6ab29c5868 install packages with -o APT::Get::Always-Include-Phased-Updates=true
to work around bug #1925745 in apt until it is SRUed.
2021-06-17 10:37:35 +12:00
Dan Bungert 21058464fd
make_cloudconfig - start moving cloud config generation to models (#975)
Add make_cloudconfig as a function that models should offer that allows
for generation of the cloud-config snippet.
Move snaplist and locale to this mechanism.
Add a test for snaplist output.
2021-06-08 16:54:29 -06:00
Michael Hudson-Doyle e812202869 wait for cloud-init in test-in-lxd.sh 2021-06-09 10:07:32 +12:00
Dan Bungert 1d42f897a1
test-in-lxd: remove privileged container usage (#974)
* test-in-lxd: remove privileged container usage

* Don't assume certain home directory name

* Try enabling groovy
2021-06-07 14:36:37 -06:00
Dan Bungert 4f9de12556
Split unit / integration tests a bit (#956)
Unit tests should be quick and run frequently.
Integration tests can be longer and run less often.
Split them up.
2021-05-17 07:31:29 -06:00