Commit graph

20435 commits

Author SHA1 Message Date
Allison Karlitskaya
eab0640513 modules: rename to vendor
This is a lot more tab-complete-friendly and it's also closer to what
many other packages do for similar situations.
2023-09-07 17:48:36 +02:00
Allison Karlitskaya
aba03dcae4 verify: allow restart messages from a test case 2023-09-07 15:54:29 +02:00
Allison Karlitskaya
e21a6799ea test: Add another another expected restart message
fcb73df1cb added this message back in 2019 but the specific error code
that we receive from the Python bridge is now different, as we can see
in new failures:

  /base1/fonts/patternfly.woff: external channel failed: protocol-error

Instead of trying to figure out how to make the Python bridge return
exactly the same error code in this situation, let's just expand the
pattern.
2023-09-07 15:54:29 +02:00
Martin Pitt
7bbf9168ac apps: Consider ID_LIKE for mapping AppStream data packages
With only looking at aos-release's `ID` field, we are missing out a lot
of derivatives, such as CentOS Stream, Rocky, or Debian-likes. Consider
ID_LIKE as well to fix that.

E.g. on Ubuntu, `ID_LIKE` is "debian", on CentOS it's "rhel fedora", on
Rocky Linux it's "rhel centos fedora".

Use that to clean up the manifest map, as Ubuntu and RHEL are now
redundant.

testBasic covers the "direct package name" case in the manifest. Add
a new testOsMap test to check the distroname → packagename map that we
use in real life.
2023-09-07 11:25:12 +02:00
Martin Pitt
76123fcda6 test: Clean up MachineCase.restore_file()
Use f-strings, and drop the unnecessary (and possibly dangerous) `rm -r`
option on restoration. This function already does not work for
directories.
2023-09-07 11:25:12 +02:00
Martin Pitt
411ce207e9 test: Reset packagekit.service in between tests
If the daemon crashes and goes into a "failed" state, it breaks all
subsequent tests. Avoid that.
2023-09-07 11:25:12 +02:00
Martin Pitt
bfd923947d tools: Fix "only arch all" Debian build
Similarly to commit 584cdfb6a0, remove the installed cockpit-beiboot
from the temporary install tree for arch-indep builds. That file was
added in commit fb673e0a7.
2023-09-07 10:03:25 +02:00
GitHub Workflow
b1bab90166 po: Update from Fedora Weblate
Closes #19290
2023-09-07 07:51:59 +02:00
Simon Kobyda
280d74e6fb test: Add VM's XML and VM's log into link-patterns
Capturing VM's xml and logs was implemented in [1], now it's time to
also include the in our link-patterns.

[1] https://github.com/cockpit-project/cockpit-machines/pull/1158
2023-09-06 21:57:35 +02:00
Simon Kobyda
f5b6a978b8 test: Remove unecessary escaping in link-patterns 2023-09-06 21:57:35 +02:00
GitHub Workflow
2d4d3804cb po: Update from Fedora Weblate
Closes #19285
2023-09-05 21:50:26 +02:00
Subho
89669003e3 networking: don't pass null to input elements
changing the `value` attribute of React input elements to null changes
it from controlled to uncontrolled, which leads to React logging errors
in the browser console.

This fixes errors of the form:

Warning: A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen...
2023-09-05 16:19:29 +02:00
Jelle van der Waa
ff5be4cdad test: include an Fedora updates-testing scenario
This scenario installs updates-testing updates before running the tests
to offer a "nightly" scenario and to replace the fedora-testing image
which is tested every X days.
2023-09-04 14:59:18 +02:00
Subho
f8e8a18722 network: distinguish create and edit dialogs 2023-09-04 12:56:06 +02:00
leomoty
7c9e04bb60 Fix application progress bar 2023-09-04 10:56:37 +02:00
Marius Vollmer
b6633ef5ce test: Mock MAC and IP addresses for pixel tests
Different values need different amounts of space and ignoring them is
thus problematic.
2023-09-01 17:37:31 +02:00
Marius Vollmer
b0a4483996 test: More careful mocking 2023-09-01 17:37:31 +02:00
Martin Pitt
966f89f9c0 test: Update TestNetworkingBasic pixel test with shorter MAC
On the most recent image refresh [1] the rendered MAC string becomes
shorter, which makes the string from the reference stick out of the
ignored area, and thus cause a pixel diff. Use the new reference with
the shorter string, so that it works with both the old and the new
image.

[1] https://github.com/cockpit-project/bots/pull/5189
2023-09-01 08:58:18 +03:00
Martin Pitt
2905325e24 test: Increase TestSELinux VM memory
`semanage` needs a lot of memory, and with 768 MiB the VM often runs
into low ram and kswapd rampage especially on RHEL 8. Increase to
default RAM size to fix that.

The original reason for reducing the memory was the static "packing" of
parallelized tests by run-tests, but since it introduced the concept of
"cost" that isn't necessary any more.
2023-09-01 05:54:59 +02:00
omarY23
84a57a82ab Remove copied checkmark when switching SELinux modifications tab
Resolves #19057
2023-08-31 14:28:00 +02:00
Martin Pitt
6a848afacc pybridge: Implement cockpit-bridge --version
It was defined in argparse, but entirely ignored, so that it started the
protocol. Also add it to the manpage.

This also unbreaks the regular cockpit/ws container builds, as they use
--version to define the tag.

Add an integration test which exercises all non-protocol options.

Fixes #19233
2023-08-31 12:43:39 +02:00
Martin Pitt
6d2f09f949 pybridge: Drop --rules option
It has never been in the manpage, it isn't implemented (it just starts
the protocol), and the C version's output is next to useless for users.

We can implement this if/when we ever get an use case.
2023-08-31 12:43:39 +02:00
Martin Pitt
2656c9c210 pybridge: Fix superuser rule caching
This previously initialized `self.bridge_rules`, but never actually
updated it, due to the `bridge_configs` vs. `bridge_rules` confusion.
Change both the class member and the local variable to `bridge_configs`
to become consistent with `Packages.get_bridge_configs()`.

Fix the type of this rules list. mypy spotted this after fixing the
variable confusion.
2023-08-31 12:43:39 +02:00
Martin Pitt
c6dbfcb275 pybridge: Add return type annotation to packages_loaded() 2023-08-31 12:43:39 +02:00
Martin Pitt
32a86a5f1a test: Avoid running check-example in regular CI runs
These are mock tests for check-testlib. There's no point in actually
running them as top-level tests, as that wastes quite a number of VM
boots.

So move them into test/example/, and check run-tests against that
testdir instead of the real test/verify/. This also better isolates
check-testlib from the real tests.
2023-08-31 13:27:41 +03:00
Martin Pitt
cc15532884 test: Make TestNetworkingUnmanaged nondestructive 2023-08-31 13:27:41 +03:00
Martin Pitt
1932e6ea09 test: Make TestStorageMountingLUKS nondestructive
None of these should run in FMF, they only test internal functionality.
2023-08-31 13:27:41 +03:00
Martin Pitt
9b5de7dabd test: Make three TestStorageLuks nondestructive
testReboot and testLuks1Slots are destructive (the latter because of its
rm rampage in /usr/bin), so move them into a new
TestStorageLuksDestructive class which keeps the provisioning.

The others can now run in FMF, it's useful to cover LUKS there.

This causes some inexplicable pixel noise, adjust the references.
2023-08-31 13:27:41 +03:00
Martin Pitt
f8912cf29f test: Make check-storage-hidden nondestructive
Drop the unused second test disk from TestStorageHiddenLuks.

This only tests internal API, don't run in FMF.
2023-08-31 13:27:41 +03:00
Martin Pitt
1a405ad9b2 test: Provision more RAM for global machines to fit LUKS tests
We have many storage tests which are only destructive because they
provision a VM with more RAM, to fit cryptsetup's
inflexible/unconfigurable PBKDF. Let's convert them to nondestructive
tests to speed them up and also make them easier to debug.
2023-08-31 13:27:41 +03:00
Marius Vollmer
9a2a4d9426 storage: Show alert when a stratis pool is in a degraded state
We don't try to be specific about what is exactly wrong with the pool
since that doesn't seem to be too well defined.  Instead we rely on
error messages from Stratis itself when the user tries operations that
are no longer possible.

The basic test is extended to make sure that no unexpected alert shows
up.
2023-08-30 22:06:42 +02:00
leomoty
461cd40184 Cleanup for table clickable rows
table-hover class is not necessary
since PF5 adds the proper hover styles
2023-08-30 16:17:09 +02:00
Martin Pitt
b2dd13512b test: Drop fedora-37
Commit 47bc4c58 dropped F37 from releasing, and
https://github.com/cockpit-project/bots/pull/5171 dropped it from CI.
2023-08-30 09:20:11 +02:00
Martin Pitt
1d80bfef6f test: Don't encrypt/move the EFI partition in encrypt_root
Doing that messes up the kernel's mount state, and eventually mounts the
new /boot *on top of* the old /boot and /boot/efi. This results in
/boot/efi not being umountable any more, and hanging forever during
shutdown on waiting for boot-efi.mount to finish stopping.
2023-08-29 21:07:40 +02:00
Martin Pitt
ab178550d7 test: Ignore "invalid non-UTF8 @data passed" message
The cause of this is unclear, but this keeps breaking random tests and
thus causes unnecessary pain/retries. Until we investigate this bug,
let's shut it up.

See issue #19235
2023-08-29 13:59:54 +02:00
Simon Kobyda
3a657a6e1c lib: Don't show icon unless 'icon' prop is passed
As per patternfly guidelines [1], validation text (which is main use of
FormHelper) should not have an icon

[1] https://www.patternfly.org/components/forms/form/design-guidelines/#errors-and-validation
2023-08-29 13:35:23 +02:00
Martin Pitt
4797203242 test: Create non-empty dummy kernel file in testCPUSecurityMitigationsEnable
Fedora 39's kernel-install command has an additional magic check that
requires the file to be at least two bytes long.
2023-08-29 12:38:57 +02:00
Martin Pitt
ce9b42c986 test: Invert "no crashkernel= by default" expectation in kdump test
Fedora 39 now has a default crashkernel= kernel option, so that
kdump.service can start by default. Now only old Fedoras are left, so
invert the condition to become simpler and eventually empty.
2023-08-29 12:38:57 +02:00
Martin Pitt
4502a0f196 test: Add fedora-39 image to README 2023-08-29 12:38:57 +02:00
leomoty
e559b73d2f storaged: Fix StorageBarMenu in dark mode 2023-08-29 08:09:43 +02:00
Simon Kobyda
3dc7649a86 lib: Fix a dropdown being hidden by a card
Workaround for https://github.com/patternfly/patternfly/issues/5865
2023-08-28 13:38:55 +02:00
Martin Pitt
97cc456304 containers/ws: Move to Fedora 38
37 will soon be EOL.
2023-08-28 10:49:52 +02:00
Martin Pitt
6123ae1e6f 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 https://github.com/cockpit-project/cockpit-podman/commit/c38692fa4ce66
2023-08-28 08:54:58 +02:00
Martin Pitt
d4986c3ba1 fmf: Drop increased timeout factor on Fedora
This has been long obsolete, since TF runs on EC2. We are not
encountering random timeouts on c8s/c9s either.
2023-08-28 08:54:58 +02:00
Martin Pitt
2bd019c5cd fmf: Drop obsolete standard-test-source support
All of Fedora's and RHEL's CI works on FMF these days.

Cherry-picked from starter-kit commit a8faf6a4.
2023-08-28 08:54:58 +02:00
Martin Pitt
fb673e0a7c pybridge: Move cockpit-beiboot from client into cockpit module
Start shipping it in the cockpit-bridge rpm/deb in libexecdir. This
paves the way for enabling this functionality in the cockpit/ws
container and other places, and reduces the flatpak special cases.

Note that this still keeps the beiboot functionality disabled for
standard package installs, as desired -- this needs to be explicitly
configured in `cockpit.conf`.
2023-08-25 18:17:26 +02:00
Martin Pitt
176d01aa85 client: Fix type in cockpit-beiboot's apply_rule() 2023-08-25 18:17:26 +02:00
Martin Pitt
7ae45acb26 client: Fix return type of do_connect_transport()
The Peer superclass defines it as not returning anything, and
_connect_task_done() doesn't care about the returned value.

Fixes

> Return type "Coroutine[Any, Any, Transport]" of "do_connect_transport" incompatible with return type "Coroutine[Any, Any, None]" in supertype "Peer" [override]
2023-08-25 18:17:26 +02:00
Martin Pitt
1670627593 client: Quiesce mypy type check for Router vs. Bridge duck typing
This is difficult to fix, we can't just require AuthorizeResponder to
actually receive a `Bridge` object, as that will collide with SshPeer.

> "Router" has no attribute "packages"  [attr-defined]

This is the same hack as in src/cockpit/channels/packages.py
2023-08-25 18:17:26 +02:00
Martin Pitt
615a493e25 client: Ensure proper data type of init message capabilities option
Fixes mypy error:

> Unsupported target for indexed assignment ("object") [index]

Unfortunately the isinstance() check doesn't convince mypy enough, so
add an extra assertion.
2023-08-25 18:17:26 +02:00