Commit Graph

98 Commits

Author SHA1 Message Date
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
Dan Bungert ffc4bbde0a runtests support - first API test, has_bitlocker 2021-08-09 10:41:54 -06: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
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
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
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
Michael Hudson-Doyle 1da1ead19c add a integation test for non-rich mode 2021-05-04 12:44:41 +12:00
Michael Hudson-Doyle 3b60666495
Merge pull request #925 from mwhudson/lp-1885644-again
add all documented fields to filesystem model classes
2021-04-12 11:24:23 +12:00
Michael Hudson-Doyle 5dbd872919 add test of mount options being propagated 2021-04-06 09:16:55 +12:00
Dan Bungert a0e2e244bd
add setting policy for post-install updates via autoinstall (#920)
* Add element updates (non-UI)

This can be controlled with autoinstall
updates: security or all

Also an API for controlling this:
curl --silent --unix-socket .subiquity/socket a/updates ->
"security"
curl -d '"all"' --unix-socket .subiquity/socket a/updates

* Automated tests - log grep for default/none/all states

* Enforce possible values on Updates controller

Route all the various get/set thru 2 common functions.
Validate incoming data.
2021-03-31 13:57:53 -06:00
Dan Bungert 2c6474f3cb Lock in current schema
Accidental schema updates are unintended, so enforce that.  Schema
updates that don't break API are fine, we can handle that by manually
regenerating the schema at such time.
2021-03-03 11:31:04 -07:00
Michael Hudson-Doyle d1afc54389 switch to github actions 2021-02-18 13:01:45 +13:00
Michael Hudson-Doyle 449ad839aa update integration tests 2020-11-04 10:57:22 +13:00
Michael Hudson-Doyle bbfcdd7b25 sort installer cloud config after 90_dpkg.cfg 2020-06-16 13:55:30 +12:00
Michael Hudson-Doyle 2ddde49a43 use the "None" datasource for on-first-boot configuration
Using the NoCloud source meant that a filesystem label of "cidata"
(probably containing autoinstall config) could override the cloud-init
nocloud seed subiquity wrote and then users would not get created. So
instead write cloud config directly that hardcodes using the
DataSourceNone source and config for it.

https://bugs.launchpad.net/subiquity/+bug/1879103
2020-06-15 15:07:03 +12:00
Michael Hudson-Doyle 3c98f68fcf use a real locale in examples/autoinstall.yaml 2020-05-21 10:49:42 +12:00
Michael Hudson-Doyle f814d9514f use more general context machinery to feed install events to progress view 2020-05-04 19:05:42 +12:00
Michael Hudson-Doyle 4564871ad2 fix tests 2020-05-04 15:28:42 +12:00
Michael Hudson-Doyle 8a84e470c5 make sure the size of a partition gets set to int 2020-05-04 14:16:03 +12:00
Michael Hudson-Doyle f8eef1d16a fix Subiquity.restart dry-run path now we actually hit that in runtests.sh 2020-04-29 19:46:17 +12:00
Michael Hudson-Doyle 05ca96d7ba run netplan generate --root .subiquity after each integration test 2020-04-29 19:39:10 +12:00
Michael Hudson-Doyle 670c9c838a add test for locale: in autoinstall file 2020-04-20 20:34:08 +12:00
Michael Hudson-Doyle 18e4d977e9 fix autoinstall refresh code to (a) match docs (b) work 2020-04-19 22:48:27 +12:00
Michael Hudson-Doyle e91f8bbf89 fix for omitting identity section when passing user-data 2020-04-19 21:44:09 +12:00
Michael Hudson-Doyle 96a6dfd010 add integration-style test for reusing an existing partitions 2020-04-14 09:50:56 +12:00
Michael Hudson-Doyle be146972da fix travis 2020-04-07 21:37:42 +12:00
Michael Hudson-Doyle b0302484d2 fix tty check for autoinstalls 2020-04-07 20:34:38 +12:00
Michael Hudson-Doyle 467257ff9a hack for testing in lxd 2020-04-02 11:11:25 +13:00
Michael Hudson-Doyle 9a68ce91c1 fix not supplying snaps in autoinstall, oops 2020-04-02 10:47:47 +13:00
Michael Hudson-Doyle c1c33dee03 add a simple integration test for autoinstall 2020-04-02 10:22:08 +13:00
Michael Hudson-Doyle fb6ea590a5 still create a subiquity-debug.log symlink 2019-09-30 16:21:42 +13:00
Michael Hudson-Doyle 7c1154b758 create one log file per invocation
Log to subiquity-debug.log.$PID instead of just subiquity-debug.log.

When we implement error reports we'll obviously attach the log to the
error report. There's no point adding log messages from previous runs of
subiquity.
2019-09-30 13:47:56 +13:00
Michael Hudson-Doyle 0c55149c31 run integration tests with simple sample data 2019-05-30 15:33:59 +12:00
Michael Hudson-Doyle c1f8c10091 answers support for refresh screen 2019-03-12 11:49:03 +13:00
Michael Hudson-Doyle 8892e027e9 make sure that dmcrypt passphrase does not end up in log 2019-02-28 11:55:44 +13:00
Michael Hudson-Doyle b77aa9499e make sure all delays during replaying answers repsect SUBIQUITY_REPLAY_TIMESCALE 2019-02-21 11:07:54 +01:00
Michael Hudson-Doyle 0457985208 fixup tests 2018-07-11 14:55:41 +12:00
Michael Hudson-Doyle 1cdfea174d add some validation of curtin config generated from answers 2018-06-19 11:43:59 +12:00
Scott Moser af94275618 Make tox and Makefile more similar.
This does a few things with the end goal of making simplifying and
making consistent tox and 'make' methods of test or check.

Things here:
 * move python programs out of bin and into their own main.  Use
   entry_points to get scripts written for them.  One gain here is
   that we no longer have python programs that are not named .py.
   flake8 and friends would not check those programs by default.
 * install scripts in bin/ using the setup.py scripts and adjust
   snapcraft.yaml and debian packaging for that.
 * declare and use PYTHON in Makefile to avoid repeating 'python3'
 * declare and use CHECK_DIRS in Makefile for list of dirs to check.
 * no longer run 'flake8' from 'make check' by default.
 * remove the old tests/ directory.
2018-06-05 22:19:17 -04:00
Michael Hudson-Doyle 43f581bca4 update travis jobs: test on cosmic, run make lint 2018-05-25 10:56:01 +12:00
Michael Hudson-Doyle f7a93e6d1b move to running tests in lxd rather than docker
other work requires having systemd running
2018-02-28 13:42:47 +13:00