diff --git a/src/ImageRunModal.jsx b/src/ImageRunModal.jsx index 7ba047199..01b1c1162 100644 --- a/src/ImageRunModal.jsx +++ b/src/ImageRunModal.jsx @@ -363,7 +363,7 @@ export class ImageRunModal extends React.Component { } getCreateConfig() { - const createConfig = {}; + const createConfig = { annotations: { created_by: "cockpit" } }; if (this.props.pod) { createConfig.pod = this.props.pod.Id; diff --git a/test/check-application b/test/check-application index 3704388ed..34d7adca5 100755 --- a/test/check-application +++ b/test/check-application @@ -1543,6 +1543,8 @@ class TestApplication(testlib.MachineCase): state='Running', owner="system" if auth else "admin") hasTTY = self.execute(auth, "podman inspect --format '{{.Config.Tty}}' busybox-with-tty").strip() self.assertEqual(hasTTY, 'true') + annotated = self.execute(auth, "podman inspect --format '{{.Config.Annotations.created_by}}' busybox-with-tty").strip() + self.assertEqual(annotated, 'cockpit') # Only works with CGroupsV2 if auth or self.has_cgroupsV2: memory = self.execute(auth, "podman inspect --format '{{.HostConfig.Memory}}' busybox-with-tty").strip()