-
Notifications
You must be signed in to change notification settings - Fork 102
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
use new syntax for stub in rspec #259
Conversation
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
|
the unit test job for Puppet 6 seems to enter an endless loop, I don't know why (https://travis-ci.org/github/dev-sec/puppet-os-hardening/jobs/752127358) |
|
Hmpf, I'm lost here ... but as it used to work until 2 months ago something elemental must have changed. The first time this test had an error was with the change from puppet 6.18.0 to 6.19.1 |
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
|
so, now the tests are technically working but the two tests seem to be broken. we could merge this now and use a separate PR to fix them (I already have some Ideas). |
|
@schurzi First of all: Thanks a lot for your effort! I'm still wondering why we get these errors (running locally This looks like test assumes we're on Solaris and tries to work with user attributes ... |
|
We have seen the same issue at customers. |
|
so I did dive a 'little' bit deeper into this. The short summary is that it may be not a good idea to use Puppet Types in Facts. So here is what I did. When we read data via To counter the execution we could also stub After I decided, that this is a dead end, I thought about some better ways to do this and came up with the idea to stub read from Both Sadly this is currently not working. There are some possible explainations for this:
To continue here we should first fix the issue with Puppet/RSpec thinking we are running on Solaris. @tuxmea wo you have some other information on this, maybe a issue link? After we have fixed that, I would really like to explore the possibility of stubbing Additional Links: |
|
I just hat a grat idea on how to change the functions and get rid of the whole problem. I will need to rewrite the custom facts to not use the Puppet ressource User. A quick test looks promising, but I still need to get the test straight. but this seems very approachable right now. |
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
This reverts commit 67a1970. Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
|
so, it seems using the Puppet Types in a fact was our main courlpit here. I changed this to the standard Ruby functions to read As far as I understand this, I is exactly what we want for Also the usage of |
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
|
regarding integration tests. I think CentOS 6 might be a bit hard to fix and maybe we should drop it from our test suite. CentOS 6 has been deprecated for quite some time. What do you think? The remaining integration tests seem to be failing because of docker rate limit. |
|
I think we can drop CentOS 6, this shouldn't matter any more ... I'll run the tests locally tomorrow and try them out |
|
Great work, @schurzi ! I'd vote for dropping CentOS 6 ... when the tests are running again we should anyway cleanup old + add new operating systems |
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
|
now all is green, after ftp5.gwdg.de is up again =) |
|
Fantastic! Can we merge this? |
|
well, I'm done. If CI says green, we can merge this any time. We should publish a minor relase though and not a bugfix. |
|
I'll publish a new release soon, there are two more PRs waiting right now. Thanks again!! |
Signed-off-by: Martin Schurz Martin.Schurz@t-systems.com