-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test: prepare for Fedora atomic #2231
Conversation
a6cb9a9
to
6edef18
Compare
Using libguestfs to update the files during vm-install didn't prove successful. Instead, we copy rpms to the vm (as we always do) and extract the files from there to the filesystem. |
successful tests on atomic: skipped: |
Lack of /var/lib/cockpit? If so, that's a real bug.
Need cockpit-test-assets |
thanks for catching that, test-assets are now included as well |
613644d
to
bc30292
Compare
@@ -77,11 +62,15 @@ class TestLogin(MachineCase): | |||
|
|||
# Try to login as user with correct password | |||
login ("user", "abcdefg") | |||
b.wait_text("#login-error-message", "Permission denied") | |||
if 'atomic' in m.os: | |||
b.wait_in_text("body", "connect or authenticate: terminated") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we fix Cockpit to also produce "Permission denied" on Atomic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably relates to using ssh under the hood. I agree: a proper error message would be good here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
follow-up issue #2402
9a22dd3
to
4122a73
Compare
@@ -158,7 +188,8 @@ def build(self, args): | |||
|
|||
def run_setup_script(self, script, args): | |||
"""Prepare a test image further by running some commands in it.""" | |||
self.start(maintain=True) | |||
# run this on the original image, not the one in the run directory | |||
self.start(maintain=True, original=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this looks wrong. The original image in $TEST_DATA/images should never be changed, except by vm-save and vm-download.
This is so that vm-create+vm-install+check-verify can produce new images in ./run without disturbing the 'golden' original image in $TEST_DATA/images. Only once we have decided that the new image is good to go will we run ./vm-save manually to replace the old golden image with a new golden image.
(With hubbot, getting a new golden image published is a bit more convoluted, but we could clean that up, actually.)
All activity should happen with the image in ./run. When starting a VM with the image in ./run, the changes made from within that VM are either saved back to the image (during vm-create and vm-install) or thrown away (during check-*).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right - I didn't consider our hubbot setup. In my testing environment, I don't clean up ./run before I create a new image.
# this image will be created on top of the new base image | ||
if os.path.exists(self._image_image): | ||
os.unlink(self._image_image) | ||
subprocess.check_call([ bootstrap_script, self._image_original, self.arch ]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using _image_original is wrong.
at the beginning of testDynamic makes it work. However, we should change cockpit-accounts.js to survive without /var/log/lastlog. I think simply not opening the "unexpected error" dialog should be enough. |
#2397 should fix check-roles. |
all previous comments addressed or posted as follow-up |
"""Start Cockpit. | ||
|
||
Cockpit is not running when the test virtual machine starts up, to | ||
allow you to make modifications before it starts. | ||
""" | ||
self.machine.execute("systemctl start cockpit-testing.socket") | ||
if "atomic" in self.machine.os: | ||
# HACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dperpeet Have you filed a bug about this upstream? If so, can you include the link here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Only echo setup script on guest in verbose mode
hubbot directory names can be too long for a socket
fix image/original image locations make init iso image more generic (not tied to just atomic)
fix whitespace skip tests on rhel 7 using unittest mechanics
expect_reload
in testlib