Commit graph

49 commits

Author SHA1 Message Date
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
Katerina Koukiou
96514e279e
main: Stop importing patternfly.css
* Stop importing cockpit's base1/patternfly.css

This is deprecated API and will be dropped at some point, in favor
of projects shipping their own CSS.

Install and import the styles from PF4 now.

* Use webpack based string replacement for removing the font-face rules from PF4

Doing the seddery in Makefile breaks `npm run build`, webpack watching,
and is generally brittle.
Do the font replacement hacking with `string-replace-loader`, which fits into webpack much more nicely.

There is still some potential simplification by not duplicating the
entire scss loader chain.

Co-authored-by: Martin Pitt <martin@piware.de>

Closes #315
2020-05-28 10:01:31 +02:00
Matej Marusak
8adad16874
Bump up version of test/common
There has been a lot of improvements since 213 and also due to new
privilege escalation this is need.

Closes #317
2020-05-23 07:51:00 +02:00
Martin Pitt
d544bda271 test: Use test scenario for selecting browser
Similar to what cockpit-composer does. This is rather simplistic, but
does fine until we need more complex scenarios.

Also use plain shell in test/run, there are no bashisms.

Closes #291
2020-03-10 17:52:30 +01:00
Martin Pitt
fa7a430847 test: Remove redundant wait_present() calls (#159)
These are obsolete since
b1722f5b5d

Bump cockpit test API accordingly.

Closes #159
2019-04-03 16:59:13 +02:00
Bogdan Mustiata
2a2f99b6f0 React to hostname changes
Closes #94
2019-01-29 12:18:43 +01:00
Martin Pitt
42579dcdc3 Run tests with Python 3
Bump Cockpit test API to 171 for this, which made the test API
bilingual.

Closes #31
2018-07-02 17:37:20 +02:00
Lars Karlitski
7260f5c01f Add scss example
Closes #26
2018-06-22 11:15:57 +02:00
Martin Pitt
47e02ef136 Add i18n for HTML and manifest 2018-06-19 18:09:57 +02:00
Martin Pitt
7ce7b2b40b Add i18n support
Make the "Running on.." string translatable and copy the extraction and
conversion of JSX and PO files from Cockpit.
2018-06-19 14:40:45 +02:00
Martin Pitt
1edb6a070b Remove some instances of "starter kit"
Rename some files and change some identifiers to be neutral to the
application name. This makes it simpler to change everything to a proper
name when cloning this project.

Document in the README how to find the remaining places to change.

Closes #20
2018-05-04 19:19:29 +02:00
Martin Pitt
931e1be3c3 Add integration test using Cockpit test API
Closes #16
2018-03-09 10:13:03 +01:00