Commit Graph

4269 Commits

Author SHA1 Message Date
Carlos Nihelton 9f52bd92bf LocaleController.start() check model language
- This is just a preparation for a feature which affects system_setup.
- The proposed change enables locale controller to respect the model
selected_language if initialized before LocaleController.start().
- This will be used in the feature which will allow prefilling
  installation UI screens during WSL installation with information
  acquired from Windows environment.
2021-10-26 15:08:04 -03: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
Dan Bungert afe31182d1
Merge pull request #1103 from dbungert/test-warnings
Address several test warnings
2021-10-19 10:34:10 -06:00
Dan Bungert 37f855562c
Merge pull request #1102 from dbungert/schema-tz
Remove timezones from schema enforcement
2021-10-19 10:28:11 -06: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
Dan Bungert c37535c530 timezone: remove possible tzs from schema 2021-10-19 10:06:01 -06:00
Dan Bungert 9818ca9717
Merge pull request #1101 from dbungert/autoinstall-no-disk
filesystem: better autoinstall error when no disk
2021-10-19 10:03:05 -06:00
Dan Bungert fdc10f19be
Merge pull request #1097 from dbungert/guided-lvm-sizes
filesystem: guided_lvm code/comment consistency
2021-10-19 09:39:40 -06:00
Didier Roche ff953cb341
Merge pull request #1099 from canonical/wsl_oobe_shutdown_testing
WSL OOBE: shutdown/reboot tests
2021-10-18 12:24:42 +02:00
Patrick Wu ec04a6833a
system_setup: shutdown/reboot tests 2021-10-18 17:15:45 +08:00
Dan Bungert 6b460abaa4 several: change attr.cmp for attr.eq
Fix several warnings of the form:
  subiquity/common/errorreport.py:83
    DeprecationWarning: The usage of `cmp` is deprecated and will be
    removed on or after 2021-06-01.
    Please use `eq` and `order` instead.

See https://www.attrs.org/en/stable/changelog.html?highlight=cmp#id76
Minimum version needed for this is 19.2.0 of attrs, and focal has 19.3.
2021-10-15 16:27:21 -06:00
Dan Bungert 38302fd81a c/api/tests: don't prefix class with Test
Fix warning:
  subiquity/common/api/tests/test_server.py:45
    PytestCollectionWarning: cannot collect test class
    'TestControllerBase' because it has a __init__ constructor
2021-10-15 16:20:29 -06:00
Dan Bungert 0308fa49b1 core test_view: don't prefix local class w/ Test
Fix warning:
  subiquitycore/tests/test_view.py:24
    subiquity/subiquitycore/tests/test_view.py:24:
    PytestCollectionWarning: cannot collect test class 'TestStretchy'
    because it has a __init__ constructor
2021-10-15 16:12:44 -06:00
Dan Bungert d9370ae54b filesystem: better autoinstall error when no disk
If no disk found was large enough for guided autoinstall, catch that
case and report it.  Without this, we get a rather unhelpful error:
FAIL: 'NoneType' object has no attribute 'grub_device'
2021-10-15 14:27:01 -06:00
Dan Bungert 3c32cb773c
Merge pull request #1076 from mwhudson/core20-cleanups
remove stdlib backports from Python 3.8
2021-10-14 14:57:48 -06:00
Dan Bungert e35f1848f7 filesystem: guided_lvm code/comment consistency
Update the guided lvm sizes to match the comments.
2021-10-13 06:45:55 -06:00
Dan Bungert db15b1c5c2
Merge pull request #1085 from dbungert/fr-1710-storage-v2-part2
/storage/v2: boot related fixes
2021-10-12 20:58:34 -06:00
Dan Bungert 4ec569fb74 storage/v2: refactor partition format/mount attrs
Cleanup some duplicated logic.
2021-10-12 20:05:35 -06:00
Dan Bungert 21c731f7ec storage/v2: expose boot on Partition
Leave current grub_device on Partiton and change nothing about it.
Add boot as an intended replacement for grub_device usage which is an
all-in-one check for the partition being the correct type of boot
partition, of which grub_device is just one scenario.
2021-10-12 20:05:35 -06:00
Dan Bungert de4b7751c2 storage/v2: fix add_boot_partition w/ multi disks 2021-10-12 20:05:35 -06:00
Dan Bungert cc0f37fead storage/v2: fix bad operator precedence in apitest 2021-10-12 20:05:35 -06:00
Dan Bungert c62d79a1e2 storage/v2: advertise boot disk as boot_device 2021-10-12 20:05:35 -06:00
Dan Bungert f17139c4a0 storage/v2: report grub_device on disk
If a partition has grub_device, that is shown at the disk level as well.
2021-10-12 20:05:35 -06:00
Dan Bungert 491842f15f storage/v2: expose grub_device on disk 2021-10-12 20:05:34 -06:00
Dan Bungert d12355710a storage/v2: fix ValueError on edit_partition 2021-10-12 20:05:34 -06:00
Dan Bungert c8a5a224a9 storage/v2: mark grub_device on BIOS 'partition' 2021-10-12 20:05:34 -06:00
Dan Bungert 5181e4a4ac storage/v2: decline a second add_boot_partition 2021-10-12 20:05:34 -06:00
Dan Bungert 39b6c428ac
Merge pull request #1088 from dbungert/apitest-improvements
test/api cohabitation with dryrun
2021-10-12 19:18:38 -06:00
Michael Hudson-Doyle 744269d074 remove stdlib backports from Python 3.8 2021-10-12 18:55:09 -06:00
Michael Hudson-Doyle 48448b2e44
Merge pull request #1096 from dbungert/runtests-detect-crash
runtests: fail on detected crash
2021-10-13 13:52:12 +13:00
Michael Hudson-Doyle 6e1c1ac176
Merge pull request #1095 from mwhudson/lp-1946790
invoke lsb_release from /target when configuring cdrom source for apt
2021-10-13 13:50:55 +13: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
Michael Hudson-Doyle adeaf9df50 invoke lsb_release from /target when configuring cdrom source for apt
for some reason lsb_release in the snap is a bit busted.

For https://bugs.launchpad.net/subiquity/+bug/1946790
2021-10-13 10:13:34 +13:00
Didier Roche 31fa83e79e
Merge pull request #1078 from canonical/wsl_oobe_deeng_83
DEENG-83 - Implement a reboot in shutdown to restart WSL instances to take new configuration in effect.
2021-10-12 18:13:07 +02:00
Patrick Wu 1d19dfb772
system_setup: implement shutdown/reboot action 2021-10-12 23:20:05 +08:00
Dan Bungert 363098d1fd
Merge pull request #1094 from mwhudson/lp-1946656
close the session object after each request to the snapd API
2021-10-12 08:59:52 -06:00
Michael Hudson-Doyle 7cfc7d1215 close the session object after each request to the snapd API
As reported in https://bugs.launchpad.net/snapd/+bug/1946656,
not-quite idle connections between subiquity and snapd are piling up and
causing issues when trying to restart subiquity. I don't really
understand why, but using a fresh session for each API access makes the
problem go away.
2021-10-12 22:22:12 +13:00
Didier Roche b4fce71e5d
Merge pull request #1079 from canonical/wsl_oobe_conf_calls_module_group
WSL OOBE - modulize the process of getting user groups
2021-10-12 09:16:23 +02:00
Patrick Wu 8559d7fe7d modulizing the usergroup retriving 2021-10-12 10:07:45 +08:00
Dan Bungert 8561e43145 test/api: use a tempdir socket
Moving the socket to a tempdir solves several problems
* helps enable parallel testing
* doesn't conflict with locally running real server instance
* a test won't connect by accident to an old server instance
2021-10-11 17:27:29 -06:00
Dan Bungert 1c5ed98430 test/api: fix hang on server shutdown
If the server was fully hung, then these shutdown steps were also stuck.
2021-10-11 17:27:29 -06:00
Dan Bungert b95ba87440 test/api: print body of incoming exceptions 2021-10-11 17:27:29 -06:00
Dan Bungert 3ce9e193cc test/api: split client connector from server
Add a connect_server() that is a drop-in replacement for start_server(),
which allows failing tests to be converted into something to connect to
an already running server instance with a single line change.
Useful for setting a breakpoint in the server against the test.
2021-10-11 17:27:29 -06:00
Dan Bungert 8bcb6b79b3 test/api: allow choosing which bootloader type 2021-10-11 17:27:04 -06:00
Dan Bungert 06a2626db8
Merge pull request #1093 from dbungert/lp-1946668
filesystem: fix lack of confirm
2021-10-11 13:32:36 -06:00
Dan Bungert 63eeb20e8f filesystem: fix lack of confirm
LP: #1946668
2021-10-11 13:11:30 -06:00
Didier Roche 02e602354d
Merge pull request #1090 from canonical/wsl_oobe_setup_user
WSL OOBE - setup users with wsl.conf
2021-10-11 09:42:03 +02: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 271b72b41a
system_setup: setup user with wsl.conf 2021-10-11 15:33:46 +08:00