-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add check for a single domain in git import #124
Add check for a single domain in git import #124
Conversation
app/models/miq_ae_git_import.rb
Outdated
MiqAeDomain.find_by(:name => @options['domain']).try(:destroy) if @options['domain'] && !@preview | ||
result = MiqAeYamlImportGitfs.new(@options['domain'] || '*', @options).import | ||
domain = Array.wrap(result).first | ||
MiqAeDomain.find_by(:name => @options['domain']).try(:destroy) if @options['domain'] && !@previewZ |
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.
@pkomanek
Is it previewZ or preview?
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.
Fixed, thank you @mkanoor
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.
Fix Typo
Checked commits pkomanek/manageiq-automation_engine@0b5deb8~...94ab21e with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Add check for a single domain in git import (cherry picked from commit 1a3c527)
Gaprindashvili backport details:
|
it "raises an exception with a message about multiple domains" do | ||
expect(MiqAeYamlImportGitfs).to receive(:new).with(domain_name, import_options) | ||
.and_return(miq_ae_yaml_import_gitfs) | ||
allow(miq_ae_yaml_import_gitfs).to receive(:domain_files) { ['BB8/__domain__.yaml', 'BB8/__domain__.yaml'] } |
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.
Wouldn't it make more sense to have the test with different directories? This looks to me like situation the code will never face - two fully identical paths :).
Disabling the import of multiple domains from a single git repo.
based on: https://bugzilla.redhat.com/show_bug.cgi?id=1497570