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 #25992 - pulp redirect for full disk fixed #75
Conversation
@lzap: What do you think of switching to a proper file downloading library like https://github.com/janko/down ? |
631fb66
to
05501bb
Compare
I feel like it's probably not necessary, we only have this place and it served well. It's no rocket science I guess. |
@lzap: Where is the code that handles |
05501bb
to
e706447
Compare
Whoops. As I said, this is not a rocket science ;-) Rebased. |
Looks good, but can we please add some tests for this? |
e706447
to
279ccc2
Compare
Absolutely, good idea. Pulled webmock for that, ideal tool. Also copied few more Rubocop rules from core which are bugging me. |
279ccc2
to
4d638b8
Compare
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.
Thanks, two small comments inline.
test/unit/iso_generator_test.rb
Outdated
end | ||
|
||
test 'fetch handles redirect' do | ||
begin |
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 can instead use Dir.mktmpdir do |dir|
to create a temporary dir that gets automatically deleted at the end of the block.
Dir.mktmpdir do |dir|
# ...
ForemanBootdisk::ISOGenerator.fetch(File.join(dir, 'bootdisk-test-redirect'), url)
end
@@ -54,3 +36,10 @@ Style/ClassAndModuleChildren: | |||
Naming/FileName: | |||
Exclude: | |||
- 'db/seeds.d/**/*' | |||
# Support both ruby19 and hash_rockets |
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.
nit: missing newline
Metrics/LineLength: | ||
Max: 180 | ||
Metrics: | ||
Enabled: false |
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.
❤️
.rubocop.yml
Outdated
@@ -54,3 +36,10 @@ Style/ClassAndModuleChildren: | |||
Naming/FileName: | |||
Exclude: | |||
- 'db/seeds.d/**/*' | |||
# Support both ruby19 and hash_rockets | |||
Style/HashSyntax: | |||
Enabled: false |
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.
Can we change this to EnforcedStyle: no_mixed_keys
so you have to at least decide for one or the other syntax?
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.
@lzap: This is still missing. ;-)
4d638b8
to
0673456
Compare
All done! |
0673456
to
9e82218
Compare
Fixed tests hopefully. |
Thanks, @lzap. |
This fixes 302 response from pulp for ondemand sync repos.