Skip to content
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

Many fixes for the test in PR #43 #46

Closed
wants to merge 17 commits into from

Conversation

pcahyna
Copy link
Member

@pcahyna pcahyna commented Oct 15, 2019

To be applied on top of it.

Note that the tests still fail despite the fixes. The original version passed by accident - ignore_errors was set on all relevant tasks.

A type of None means no formatting. An exception is when there is a
blkid-reported type that blivet doesn't have special handling for,
in which case type will be None but the name attribute will reflect
the type reported by blkid. In this special case we treat the
formatting as though it had a non-None type.
disks: "{{ unused_disks }}"
# type: partition
volumes:
- name: bar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we already have a test that does this for LVM, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very well possible. The test did not work as it was (with partition) so I made a small change to improve it.

type: partition
# type: partition
volumes:
- name: bar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's implemented, just an incorrect key in the class lookup dict. It's fixed in #43.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will revert this part then

dwlehman and others added 7 commits October 15, 2019 09:02
While both before and after it should trigger an error in the role,
and therefore both are valid tests, a valid array with a nonexistent disk
is more likely to be what was intended, and therefore preferable.
(The former variant actually checked for bad syntax, not for handling
of nonexistent disks.)
The latter would be a valid test as well, but a less important one, and
currently it does not work properly.

Do not use ignore_errors: yes on the test block, it makes all assert
pointless. Use a rescue task instead.
- this makes all test asserts pointless.

Instead catch the error using rescue.

Actually verify that data heve not been destroyed.
and check for errors properly. Verify again that data have not been lost.

Do not use a pool type of partition, seems to be unimplemented.

Create one volume in the pool, the role does not cope with empty pools.

Note that even with those changes the role application fails -
apparently it refuses to create a VG when there is already a filesystem,
even with safe mode off.
@dwlehman
Copy link
Collaborator

I did a force-push to update 'Fix logic of safe mode guard on reformat.'

Picking that up should help at least with the failure CI is hitting now.

@pcahyna
Copy link
Member Author

pcahyna commented Oct 17, 2019

@dwlehman don't you want to merge this PR into your #43 ?

@pcahyna
Copy link
Member Author

pcahyna commented Oct 17, 2019

I did a force-push to update 'Fix logic of safe mode guard on reformat.'

@dwlehman Where did you push it? I don't see any new commit.

@pcahyna
Copy link
Member Author

pcahyna commented Oct 17, 2019

Sorry, I see it now.

@pcahyna pcahyna force-pushed the non-destructive-test branch from 38feb52 to 0494d06 Compare October 18, 2019 11:56
@dwlehman
Copy link
Collaborator

Yeah, sorry about that. I didn't realize you were following my work so closely at the time. I won't be doing any more force-pushes to avoid the confusion they can cause.

@pcahyna
Copy link
Member Author

pcahyna commented Oct 18, 2019

No problem, just please avoid touching the same test. But since you need a test for your work, I think including this PR in your PR would be better. By the way the rebase did not help. It still fails (unmounts the filesystem and therefore the test believes it lost data).

@pcahyna
Copy link
Member Author

pcahyna commented Oct 18, 2019

By the way, I created a separate assert for the problem that is now causing the test to fail: #47

@pcahyna pcahyna mentioned this pull request Oct 21, 2019
@pcahyna pcahyna closed this Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants