-
Notifications
You must be signed in to change notification settings - Fork 368
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
Added mode, owner_user, and owner_group methods to file #544
Added mode, owner_user, and owner_group methods to file #544
Conversation
085682f
to
4388d26
Compare
@@ -338,10 +338,25 @@ | |||
end | |||
|
|||
describe file('/etc/passwd') do | |||
let(:stdout) { "644\r\n" } |
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.
I tried to avoid using let(:stdout)
but couldn't seem to get it working otherwise. I'm still not sure how the be_mode
and be_owned_by
matchers are working =/
Thanks! But it would be better that https://docs.puppetlabs.com/references/latest/type.html#file |
Ah, k. I chose those to keep things consistent in the repo. We could also use an |
4388d26
to
2988094
Compare
I have applied the updates to this PR |
Thanks! One more thing, it would be useful that |
Ah, sure thing. I will update that. |
I started moving to an octal but the error messages from failing test suites have become less useful:
The |
Ah, let me rethink about it. Thanks for reporting! |
Any new thoughts on this? |
2988094
to
5ae13e5
Compare
Sorry for letting you wait. I didn't think of any good ideas. So I'd like to merge current code. Could you fix this line to pass tests, please ? |
Oh, heh. I didn't realize I broke the build. Yep, I will push a patch shortly. |
5ae13e5
to
2d8147d
Compare
Alright, I have updated the code so it should be green in Travis CI now |
Thanks! |
Added mode, owner_user, and owner_group methods to file
Released as v2.29.0. |
When writing tests, I was getting frustrated at the poor feedback I was getting for mode, user, and group. For example, in the error below, there is no information about what the current mode is:
I saw that we have an
mtime
method and while I don't know its motivations (kind of hard with no GitHub issues or related PR in the blame =/). However, I gave a shot at adding inmode,
owner_user, and
owner_group`. In this PR:mode
,owner_user
, andowner_group
methods to file