-
Notifications
You must be signed in to change notification settings - Fork 982
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
fixes #8857 - refactor Debian boot_files_uri into parent class to match CoreOS #2053
fixes #8857 - refactor Debian boot_files_uri into parent class to match CoreOS #2053
Conversation
There were the following issues with the commit message:
Guidelines are available on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
96b600c
to
a65b971
Compare
[test] |
a65b971
to
9adce26
Compare
[test] |
@@ -0,0 +1,45 @@ | |||
require 'test_helper' | |||
|
|||
class DebianTest < ActiveSupport::TestCase |
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.
The name of this file has a typo, "debin" instead of "debian". When you correct it, please put the test in test/unit/operatingsystems/debian_test.rb
, just to keep a consistent hierarchy with the one in app/models
@johscheuer Nice job! There are only a few issues with the way tests are structured in my opinion, it works well although I have not thoroughly tested it yet. See the comments above and I'll test it a bit more, but it looks like 👍 from my side. 😄 |
@elobato Thanks 👍 :) I will have a look and fix these things. |
9adce26
to
774f1cb
Compare
774f1cb
to
f7d0252
Compare
There were the following issues with the commit message:
Guidelines are available on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
3449e8b
to
513cb5e
Compare
[test] |
513cb5e
to
3d22c8e
Compare
assert_equal 1, operatingsystems.count | ||
assert_equal operatingsystems(:suse), operatingsystems.first | ||
assert_equal operatingsystems(:centos5_3), operatingsystems.first | ||
end |
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 changed the os from Suse to centos, so we can safely remove the fixture for Suse
[test] |
There were the following issues with the commit message:
Guidelines are available on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
…ass to match CoreOS Removed ubuntu_utopic from media.yml which caused the postgresql tests to fail Refactored unit tests Refactored os unit tests into one test file with param. tests Refactored usage of fixtures into factories Remove Checkstyle warnings and changed operatingsystem_test to use centos instead of suse fixed Lint/BlockAlignment
6f17b0d
to
93e6a06
Compare
[test] |
Looks pretty good, I'll comment a few nitpicks I'll fix on merge just to leave some footprint. Just a sec... |
@@ -252,7 +252,7 @@ def downcase_release_name | |||
end | |||
|
|||
def boot_files_uri(medium, architecture, host = nil) | |||
raise (_("invalid medium for %s") % to_s) unless media.include?(medium) | |||
raise ::Foreman::Exception.new(N_("invalid medium for %s"), to_s) unless media.include?(medium) |
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.
Change to_s
to self
. A rubocop cop we should use forces this, it's much more readable.
Merged as 03363cd, fixes in e760512, thanks @johscheuer! |
Refactor Debian boot_files_uri into parent class to match CoreOS. See Issue http://projects.theforeman.org/issues/8857