Commit graph

46 commits

Author SHA1 Message Date
Megan Wilhite
0fde37e4d5 Add workaround for salt-master on classic mac pkg tests 2023-09-29 16:12:59 +01:00
Megan Wilhite
05b141d934 Ensure we don't call .bat minion file with python 2023-09-29 16:12:59 +01:00
Megan Wilhite
ab783334da Force generate scripts for Salt master on windows package tests 2023-09-29 16:12:59 +01:00
Megan Wilhite
4608a470b0 Migrate the package tests to use the main test dependencies 2023-09-29 16:12:59 +01:00
MKLeb
babc5c12c0 Address review comments 2023-09-11 21:41:05 +01:00
MKLeb
1518b9617c Fix windows downgrade tests 2023-09-11 21:41:05 +01:00
MKLeb
7c9df30a8a Fix --use-prev-version option 2023-09-11 21:41:05 +01:00
MKLeb
d986874ab0 Initial attempt at downgrades on RPMS and DEBS 2023-09-11 21:41:05 +01:00
MKLeb
8a0e2ec338 Some more cleanup 2023-09-11 21:41:05 +01:00
MKLeb
3a7995634b Slim down the package test suite helpers a little, there were some unneeded pieces 2023-09-11 21:41:05 +01:00
MKLeb
afb229431c Add downgrade option for the install salt fixture 2023-09-11 21:41:05 +01:00
Barney Sowood
39b464a58d Remove some perms checks in conftest.py
Remove checks for perms on /var/log/salt/master and /var/run/salt/master
in the salt_master fixture as they may not existing during an upgrade
test and it's not critical to test them in the fixture.
2023-08-16 15:53:29 -07:00
Barney Sowood
cc7611e1db Handle pytest-salt-factories permission changes
Handles permission changes caused by test suite running as root and
the creation of /var/cache/salt/master/.root_key.

Running the test suite as root means that /etc/salt/pki/master subdirs
get their ownership changed to root - clean that up in conftest.py.
No longer need to fix /var/log/salt as we handle the files in there
individually.

Adds exclusion for /var/cache/salt/master/.root_key as that gets created
by salt* cli tools running as root.
2023-08-16 15:53:29 -07:00
Barney Sowood
cd93818c86 Update files to verify in pkg tests
Updates lists of files to check in package tests when starting master.
We now set the following as owned by salt:salt in master postinst

* /etc/salt/pki/master
* /etc/salt/master.d
* /var/log/salt/master
* /var/cache/salt/master
* /var/run/salt/master
2023-08-16 15:53:29 -07:00
Pedro Algarvio
a9bbfd0e47 Properly upgrade Debian based systems unattended
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-07-27 16:26:25 +01:00
MKLeb
e11d6a478a More fixes for upgrades of NSIS packages from relenv-based previous versions 2023-06-29 13:01:04 -07:00
Pedro Algarvio
40d8564265
The fixture should be session scoped
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-06-17 20:45:41 +01:00
Pedro Algarvio
28d2987b63 Make sure system installed packages are up-to-date before running tests.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-06-17 13:39:37 +01:00
Pedro Algarvio
a59929ad20 Be sure to run the installed script to confirm it works
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-05-05 10:11:18 +01:00
Pedro Algarvio
63e45bc5aa Add supporting code to get the system's grains as a fixture
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-04-29 18:18:53 +01:00
Megan Wilhite
d2bd6004a8 Only set file and pill roots perms on linux 2023-04-20 19:57:06 +01:00
MKLeb
bb2a12db32 Fix salt-api not starting and ensure the pip module installs into the desired relenv directory by default 2023-04-15 20:49:08 +01:00
Megan Wilhite
dda65af43d Set correct perms on file and pillar roots in test suite 2023-04-15 20:49:08 +01:00
Megan Wilhite
b7b3d5fa40 Fix permissions in test suite and add all paths to both packages 2023-04-15 20:49:08 +01:00
Megan Wilhite
741918923d Only open master file if it exists 2023-04-15 20:49:08 +01:00
Megan Wilhite
ddc8f4c232 Set master config in pkg/common 2023-04-15 20:49:08 +01:00
Megan Wilhite
4013d4e9a5 Use system configs if user is salt 2023-04-15 20:49:08 +01:00
Megan Wilhite
35ddf6319f Use salt default configs 2023-04-15 20:49:08 +01:00
Pedro Algarvio
0144652d3c Download package test are now skipped by default.
Passing `--download-pkgs` will enable them.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-03-16 21:00:40 +00:00
Twangboy
8922b339ac Fix pre-commit 2023-02-28 15:27:46 +00:00
Twangboy
6e81b8ab6b Fix test_pkg tests for Windows 2023-02-28 15:27:46 +00:00
Megan Wilhite
fb55a5f1a3 Run salt-master from script when using classic packages 2023-02-28 15:27:46 +00:00
Megan Wilhite
3582c14e88 Fix Windows NSIS upgrades from onedir to relenv 2023-02-28 15:27:46 +00:00
Twangboy
f6f057af63 Fix failing linux tests... and maybe macos 2023-02-28 15:27:46 +00:00
Twangboy
1e8f3c2fd4 Fix pre-commit 2023-02-28 15:27:46 +00:00
Twangboy
f281394e0a Fix issues with salt-master starting and accepting keys on Windows 2023-02-28 15:27:46 +00:00
Twangboy
0cf2e1a4f7 Start salt-master on Windows 2023-02-28 15:27:46 +00:00
MKLeb
188053be22 Prepend the salt package version with 1: on deb-based distros 2023-02-28 15:27:46 +00:00
Megan Wilhite
e76520bcfe Add ability to pass in --prev-version=<version> to test an upgrade from that version 2023-02-28 15:27:46 +00:00
David Murphy
efc733050f Update regex to allow for Debian family architectures and tarballs correctly 2023-02-28 15:27:46 +00:00
Gareth J. Greenaway
6ee6784d24 Changes for running pkg tests on Mac. 2023-02-28 15:27:46 +00:00
Megan Wilhite
cff6d2ac6d Add upgrade tests 2023-02-28 15:27:46 +00:00
MKLeb
1c97f28897 fix test_version packages tests 2023-02-28 15:27:46 +00:00
Megan Wilhite
a446019221 Fix tests and enable local salt-api client 2023-02-28 15:27:46 +00:00
Megan Wilhite
60e35a1990 Use and older version of pytest-salt-factories for pkg tests 2023-02-28 15:27:46 +00:00
Megan Wilhite
1a2c2bb443 Initial setup of package tests (migrated from salt-pkg) 2023-02-28 15:27:46 +00:00