This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def self.unassociate_ids_from_repo(repo_id, ids) | |
| unassociate_from_repo(repo_id, :association => {'unit_id' => {'$in' => ids}}) | |
| end | |
| vs | |
| def self.unassociate_ids_from_repo(repo_id, ids) | |
| unassociate_from_repo(repo_id, :unit => {'id' => {'$in' => ids}}) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| For all cases: | |
| Unit.rb methods | |
| * self.unassociate_from_repo(repo_id, filters) | |
| 1) | |
| Unit.rb | |
| * self.unassociate_ids_from_repo(repo_id, ids) | |
| * self.unassociate_unit_ids_from_repo(repo_id, unit_ids) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rdb:1) y errata[0] | |
| --- !map:ActiveSupport::HashWithIndifferentAccess | |
| created: "2013-01-19T01:50:00Z" | |
| updated: "2013-01-19T01:50:00Z" | |
| owner_type: importer | |
| id: 50f9b578196cbe10990012eb | |
| repo_id: integration_test_id | |
| _id: !map:ActiveSupport::HashWithIndifferentAccess | |
| $oid: 50f9b578196cbe10990012eb | |
| owner_id: yum_importer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Pylint shows | |
| 4********* Running Pylint ************************ | |
| 1715RUNNING: PYTHONPATH=src/ pylint --rcfile=./etc/spacewalk-pylint.rc --additional-builtins=_ katello | |
| 1716************* Module katello.client.main | |
| 1717W0622: 19,0: Redefining built-in 'filter' | |
| 1718************* Module katello.client.api.filter | |
| 1719C0301: 28,0: Line too long (121/120) | |
| 1720C0301: 38,0: Line too long (121/120) | |
| 1721W0613: 22,37:FilterAPI.filters_by_cvd_and_org: Unused argument 'definition' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def test_duplicate_name | |
| attrs = FactoryGirl.attributes_for(:content_view_definition, | |
| :name => @content_view_def.name | |
| ) | |
| assert_raises(ActiveRecord::RecordInvalid) do | |
| ContentViewDefinition.create!(attrs) | |
| end | |
| cv = ContentViewDefinition.create(attrs) | |
| refute cv.persisted? | |
| refute cv.save |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "minitest_helper" | |
| class Api::FiltersControllerTest < MiniTest::Rails::ActionController::TestCase | |
| fixtures :all | |
| def setup | |
| @filter = filter | |
| login_user(users(:admin)) | |
| models = models = ["Organization", "KTEnvironment", "User","ContentViewEnvironment", "ContentViewDefinition"] | |
| services = ["Candlepin", "Pulp", "ElasticSearch"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Run options: --seed 17358 | |
| # Running tests: | |
| You are using WebMock 1.11.0. VCR is known to work with WebMock >= 1.8.0, < 1.10. It may not work with this version. | |
| .........................................................S.........................................................................................................................................................DEPRECATION WARNING: You're trying to create an attribute `content_view_id'. Writing arbitrary attributes on a model is deprecated. Please just use `attr_writer` etc. (called from create_distributor at /home/paji/katello/katello/src/test/support/candlepin/consumer_support.rb:74) | |
| S.DEPRECATION WARNING: You're trying to create an attribute `content_view_id'. Writing arbitrary attributes on a model is deprecated. Please just use `attr_writer` etc. (called from create_distributor at /home/paji/katello/katello/src/test/support/candlepin/consumer_support.rb:74) | |
| ......S....SSSSSS....................S................................................... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class HeadpinMigration < ActiveRecord::Migration | |
| if Katello.config.headpin? | |
| class KTEnvironment < ActiveRecord::Base | |
| self.table_name = "environments" | |
| belongs_to :organization, :inverse_of => :environments | |
| has_many :systems, :inverse_of => :environment, :dependent => :destroy, | |
| :foreign_key => :environment_id | |
| before_destroy :remove_from_candlepin | |
| def remove_from_candlepin | |
| Rails.logger.info _("Deleting environment in candlepin: %s") % self.label |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class HeadpinMigration < ActiveRecord::Migration | |
| if Katello.config.headpin? | |
| class HeadpinSystem < ActiveRecord::Base | |
| self.table_name = "systems" | |
| has_many :system_system_groups, :dependent => :destroy, :class_name => "HeadpinSystem" | |
| has_many :system_groups, {:through => :system_system_groups} | |
| belongs_to :environment, :class_name => "KTEnvironment", :inverse_of => :systems | |
| has_many :system_activation_keys, :dependent => :destroy | |
| has_many :activation_keys, :through => :system_activation_keys | |
| before_save :update_consumer_env_in_cp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Copyright 2013 Red Hat, Inc. | |
| # | |
| # This software is licensed to you under the GNU General Public | |
| # License as published by the Free Software Foundation; either version | |
| # 2 of the License (GPLv2) or (at your option) any later version. | |
| # There is NO WARRANTY for this software, express or implied, | |
| # including the implied warranties of MERCHANTABILITY, | |
| # NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should | |
| # have received a copy of GPLv2 along with this software; if not, see |
OlderNewer