Commit graph

61 commits

Author SHA1 Message Date
Martin Pitt
dfca8ebe76 test: Drop testing on CentOS 8 Stream
C8S is going to be EOL in a month [1], and we are not going to do a RHEL
8 update at this point any more.

Keep testing on rhel-8-10 though, as we do want to keep the code working
for the beiboot scenario or backports.

[1] https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/
2024-04-29 09:11:58 +02:00
Martin Pitt
fec7c33258 fmf: Restrict "-stream" TEST_OS suffix to CentOS 8/9
Our c10s CI image is called "centos-10" without the -stream suffix. This
fits better with `os-release` and makes the names shorter. Adjust the
building of `$TEST_OS` accordingly.

[1] https://github.com/cockpit-project/bots/pull/6218
2024-04-16 12:38:26 +02:00
Martin Pitt
2a675f9f57 fmf: Add workaround for podman firewall driver bug on RHEL 10
See https://bugzilla.redhat.com/show_bug.cgi?id=2273078
2024-04-15 12:54:50 +02:00
Martin Pitt
095edc5f7e test: More precise dropdown selector
Cockpit 315 changed the session menu from the deprecated PF Dropdown to
the new one, via cockpit-components-dropdown. `DropdownItem` now renders
the class name into *both* the `<li>` and the `<button>` inside of it,
so select the button to avoid an ambiguous selector.
2024-04-11 18:12:51 +02:00
Marius Vollmer
64cb49b1e4 tmt: Pass TEST_* environment into test container
So that things like TEST_AUDIT_NO_SELINUX can be set from the outside.
2024-04-03 13:57:57 +02:00
Martin Pitt
ee5e9bd243 fmf: Use correct os-release
With commit 2e8b932e, run-test.sh now runs inside the cockpit/tasks
container, and its os-release is irrelevant. Read the host's os-release
instead to compute a correct `$TEST_OS`.
2024-03-18 08:50:36 +01:00
Martin Pitt
7b1315a3ca test: More precise firewall configuration
Only enable cockpit in the firewall if it is actually running, not
merely installed.
2024-03-18 08:50:36 +01:00
Martin Pitt
84608a1680 fmf: Go back to running the tests with Firefox
That brings back Firefox coverage, and also avoids OOM errors with
Chromium. This was already applied to our other projects.
2024-03-18 08:50:36 +01:00
Allison Karlitskaya
2e8b932ece test/browser: run tests inside the tasks container
This simplifies the "outside" setup quite a bit and gives us the same
tasks container that test runs on the Cockpit CI run under.

This change also implicitly changes the test browser to chromium (which
is no longer an issue — we just use it from the tasks container).
2024-03-15 15:22:56 +01:00
Martin Pitt
a0f5432f4e Drop remaining vestiges of $LINT
This got removed in commit 15be883595.
2024-02-08 09:10:31 +01:00
Martin Pitt
cb6a2b84ca fmf: Fix saving of artifacts
These need to be copied into `$TMT_TEST_DATA`. We already did this in
derived projects like cockpit-podman, but forgot it here.
2024-02-07 20:27:15 +01:00
Martin Pitt
5d2840449a Use Cockpit's shared static code checks
These will soon take over ESLint and stylelint, plus they also cover
ruff and other goodies for the Python part. This supersedes the explicit
ruff call.

This is already being used by cockpit-{podman,machines,navigator} etc.
2024-02-07 17:57:56 +01:00
Martin Pitt
ac77bafede Add ruff configuration
Apply our standard set of rules from our cockpit projects, and fix some
minor fallout:
```
test/check-application:7:1: I001 [*] Import block is un-sorted or un-formatted
test/check-application:9:119: E501 Line too long (122 > 118 characters)
```

Run ruff in CI to ensure we don't break it.
2023-09-22 10:42:05 +02:00
Martin Pitt
9544f57220 fmf: Plumb through $TEST_* variables for unexpected messages
This will allow us to control the value from test plans, in particular
for disabling at least some unexpected message checks for reverse
dependency testing. We don't want to disable unexpected messages
in general for fmf, as we are looking for exactly these in e.g.
selinux-policy reverse dependency tests.

Move from `su` to `runtest`, as with the former it's impossible to plumb
through variables with non-trivial characters, as they cannot be quoted.

Taken from c38692fa4c
2023-08-28 08:53:51 +02:00
Jelle van der Waa
bd2ac26df6 Drop sizzle test dependency 2023-07-31 19:27:09 +02:00
Allison Karlitskaya
2215aa3bf8 Makefile: bump our test/common dependency
... and make use of the new pywrap feature from our test.

Use the same eslint and stylelint plugin configuration as the cockpit
main repo.

Co-authored-by: Katerina Koukiou <kkoukiou@redhat.com>
2023-05-26 17:34:51 +02:00
Cockpit Project
092cefab3b package.json: Update @patternfly/patternfly, @patternfly/react-core, @patternfly/react-icons, @patternfly/react-styles
Bump Cockpit commit to pick up the necessary adjustments for latest PF,
and adjust test for the new "-v5" namespace prefix.

Closes #654
2023-05-22 09:58:44 +02:00
Subho
1c30b49d3d
Move from webpack to esbuild bundler 2023-04-12 10:23:20 +02:00
Martin Pitt
a8faf6a43a fmf: Drop obsolete standard-test-source support
All of Fedora's and RHEL's CI works on FMF these days.
2023-03-28 10:25:54 +02:00
Martin Pitt
4990d6a103 build: Move to a webpack module
Cockpit recently changed to an ESM build system [1]. Bump
COCKPIT_REPO_COMMIT to that and follow suit.

This does not work with old node.js 10 any more which is still the
default in RHEL 8. Install the newer version 16 instead.

[1] https://github.com/cockpit-project/cockpit/pull/18366
2023-02-20 10:01:02 +01:00
Allison Karlitskaya
03d02f398a build: add support for /pybridge scenario
Build the Python bridge from the cockpit project and install it into the
VM so we can run tests against it.
2023-02-01 17:40:48 +01:00
Martin Pitt
652b06d900 test: Check that window title is translated
This is actually kind of surprising: We never call cockpit.translate()
anywhere.
2022-07-21 08:31:27 +02:00
Martin Pitt
109fa37309 test: Drop obsolete fallbacks for cockpit < 266
CentOS 8 Stream has version 270, that's the oldest version that we
support.
2022-07-21 08:31:27 +02:00
Martin Pitt
a937b82cd2 test: Bump Cockpit test API to 267, use --track-naughties option
run-tests recently got a new `--track-naughties` option [1] to explicitly
enable updating known issues on GitHub. Enable it for CI runs, and leave
it disabled for local runs and PackIt, as in these cases we don't want
to try and talk to GitHub.

[1] 7ef88e80ce
2022-04-19 13:14:21 +02:00
Martin Pitt
65bf109fad test: Add quirk for cockpit 265 shell menu translation regression
[1] regressed the translations of menu labels for external projects.
This will get fixed in the next version [2]. Adjust the tests to not
break with Cockpit version == 265.

[1] af5678b0be
[2] https://github.com/cockpit-project/cockpit/pull/17145
2022-03-17 11:43:39 +01:00
Martin Pitt
8862b2b497 test: Restrict language switching reload hack to affected browser/version
This was fixed in Cockpit 265, and has only ever affected Chromium, not
Firefox. Restrict the hack accordingly, to make sure this does not
regress again.
2022-03-17 11:43:39 +01:00
Martin Pitt
2f92610f28 Bump cockpit lib and test API to 265
Drop the obsolete expect_load().
2022-03-17 11:43:39 +01:00
Martin Pitt
b2662eeebd Use image-customize --build to build/install distribution packages
This centralizes/factorizes the rpm package builds, and builds
RPM packages in the VM instead of on the host, which is cleaner. It also
paves the way for supporting Debian and arch builds.

Drop the `make srpm` rule, as it's not very useful. Keep the `make rpm`
rule, as sometimes developers do this manually. This might be replaced
later on with another image-customize feature which copies the built rpm
out of the VM.
2022-02-07 15:42:01 +01:00
Martin Pitt
8eaa689491 Bump cockpit lib and test to 262
Create test/reference-image as required by testlib 261.
2022-02-04 08:47:32 +01:00
Martin Pitt
9fce37f215 fmf: Don't install weak firefox dependencies
firefox pulls in half a desktop, we don't need any of these for a
headless test. This reduces the number packages from 133 (459 MB) to 66
(365 MB).
2022-02-04 08:47:32 +01:00
Martin Pitt
ba3913caa0 fmf: Work around missing /etc/nsswitch.conf in Fedora Rawhide
Upgrading glibc in Rawhide now (semi-intentionally) removes
/etc/nsswitch.conf, but does not enforce installing a new enough
pam/authselect to ensure that it gets re-added. This breaks resolving
"localhost".

Reported as https://bugzilla.redhat.com/show_bug.cgi?id=2033020
2021-12-16 08:40:55 +01:00
Martin Pitt
9e162423eb fmf: Go back to firefox distro version
By now the packaged firefox contains CDP. This makes the tests more
robust against CDP breakage in nightly.
2021-12-15 09:24:48 +02:00
Martin Pitt
aa8308c380 test: Drop obsolete language switcher cases
The oldest release which we support is 251 from RHEL/CentOS 8.5, so we
don't need the older cases any more. Also move to
MachineCase.system_before().
2021-11-29 11:20:59 +01:00
Martin Pitt
4820c2b740 test: Adjust language changing for Cockpit 258
That version rewrote the Shell in React, the ids/classes changed.
2021-11-29 09:40:38 +01:00
Martin Pitt
c04d951964 packit: Run tests on CentOS 9 stream 2021-11-16 15:20:32 +01:00
Martin Pitt
8074af0fbd fmf: Only install git-core
We don't need all the bells and whistles of the full git package.
2021-10-07 12:38:03 +02:00
Martin Pitt
72c15c4b82 packit: Enable CentOS Stream 8 2021-10-07 12:38:03 +02:00
Martin Pitt
5d15bdac5c fmf: Dependency installation robustification
Sync some improvements from cockpit-machines:

 * Unbreak running `tmt` in local trees with an already existing ./bots
   symlink.
 * Don't install all NPM packages, only chrome-remote-interface and sizzle.
 * Disable detection of affected tests, taking too long for real
   projects.
2021-10-07 12:38:03 +02:00
Martin Pitt
0bc01714ee fmf: Run tests with firefox
Chromium has started to crash in current Fedora, and is not easily
available in RHEL.

Install bzip2 to unpack the nightly tarball.
2021-10-07 12:38:03 +02:00
Martin Pitt
cfaa74f761
test: Fix host name lookup (#473)
Our code reads /etc/hostname. Do the same in the test, as the runtime
sethostname(2) (set by hostnamed) and static host name may be different.
2021-07-06 09:02:39 +02:00
Allison Karlitskaya
37b2ee5056 various: master → main updates
cockpit/ bots/ and cockpituous/ all use the 'main' branch now.
2021-07-05 10:47:18 +02:00
Martin Pitt
b5610000b5 fmf: Add glibc-langpack-de test dependency
The tests switch to German, make sure that the corresponding locale
exists. Otherwise, tests will run into unexpected messages like "invalid
or unusable locale: de_DE.UTF-8".
2021-04-19 10:33:02 +02:00
Martin Pitt
d02579694d test: Adjust to language selector change in Cockpit 242
See bf1f645208
2021-04-19 09:46:48 +02:00
Martin Pitt
09823650e2 Add FMF test metadata and scripts
Copy and adjust the browser.sh and run-test.sh scripts from
cockpit-podman, which we have used in Fedora/RHEL dist-git gating and
packit tests for a while.
2021-03-04 11:25:53 +01:00
Martin Pitt
603308d424 test: Make tests nondestructive
So that they can run in Packit and Fedora dist-git gating.
2021-03-04 11:25:53 +01:00
Martin Pitt
d4c81c9152 Bump cockpit test API to 239
Replace the deprecated wait_present().
2021-03-04 07:42:37 +01:00
Martin Pitt
670f528781 Adjust test for changed display language modal
f1542d54db rewrote
the language selector dialog. Update the tests to also work with
cockpit ≥ 233.

Do the version comparison dynamically for the time being, as this breaks
several image refreshes. We can drop this again and only use the new
code once all of these landed.
2021-01-01 08:37:23 +01:00
Martin Pitt
c1c2d83b81 Bump test/common dependency to 233
This gets rid of the hack for
<https://github.com/cockpit-project/cockpit/issues/14133>.
2020-11-25 21:09:53 +01:00
Martin Pitt
2bb8e01d2d
Port to PatternFly 4.x
Closes #343
2020-07-21 10:33:48 +02:00
Martin Pitt
820549d862
test: Adjust to new navigation in Cockpit 220
The parent element `#navbar-dropdown` exists in both old and new
versions.

Closes #325
2020-06-02 08:44:49 +02:00