Skip to content

Commit

Permalink
Merge branch 'master' into akamai_cdn_migration
Browse files Browse the repository at this point in the history
  • Loading branch information
paragjain0910 authored Dec 12, 2024
2 parents caa9831 + 896eed1 commit 47a3723
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/lint-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ jobs:
- name: Run core tests
run: |
bundle exec rake test:core
- name: Run core tests with sqlite
run: |
sed -i 's/adapter: mysql2/adapter: sqlite3/' config/rmt.yml
bundle exec rake test:core
- name: Run PubCloud engines tests
run: |
bundle exec rake test:engines
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/rmt/cli/smt_importer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'rails_helper'
require 'rmt/cli/smt_importer'

describe RMT::CLI::SMTImporter do
describe RMT::CLI::SMTImporter, :skip_sqlite do
let(:data_dir) { File.join(Dir.pwd, 'spec/fixtures/files/csv') }
let(:no_systems) { false }
let(:importer) { described_class.new(data_dir, no_systems) }
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/rmt/lockfile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RSpec.describe RMT::Lockfile do
let(:lock_name) { nil }

describe '#lock' do
describe '#lock', :skip_sqlite do
subject(:lock) { described_class.lock(lock_name) { nil } }

context 'with an unnamed lock' do
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/rmt/scc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
described_class.new.sync
end

it 'removes existing predecessor associations' do
it 'removes existing predecessor associations', :skip_sqlite do
expect { ProductPredecessorAssociation.find(existing_association.id) }.to raise_error(ActiveRecord::RecordNotFound)
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/models/repository_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
expect(friendly_id).to eq('my-repo-100000')
end

it 'appends with unicode within the chain' do
it 'appends with unicode within the chain', :skip_sqlite do
create(:repository, friendly_id: 'my-repo')
create(:repository, friendly_id: 'my-repö-1')
expect(friendly_id).to eq('my-repo-2')
Expand All @@ -165,13 +165,13 @@
expect(friendly_id).to eq('dümmy-repö')
end

it 'appends with unicode within the chain' do
it 'appends with unicode within the chain', :skip_sqlite do
create(:repository, friendly_id: 'dummy-repo')
create(:repository, friendly_id: 'dümmy-repö-1')
expect(friendly_id).to eq('dümmy-repö-2')
end

it 'correctly appends' do
it 'correctly appends', :skip_sqlite do
create(:repository, friendly_id: 'dummy-repo')
create(:repository, friendly_id: 'dummy-repo-1')
expect(friendly_id).to eq('dümmy-repö-2')
Expand Down
6 changes: 6 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
config.filter_rails_from_backtrace!
# arbitrary gems may also be filtered via:
# config.filter_gems_from_backtrace("gem name")

# Skipping some tests when running with (experimental) sqlite backend.
# Some tests / code parts are using specific mysql behavior
if ActiveRecord::Base.connection.adapter_name == 'SQLite'
config.filter_run_excluding skip_sqlite: true
end
end

Shoulda::Matchers.configure do |config|
Expand Down
2 changes: 1 addition & 1 deletion spec/services/repository_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

it('is not custom') { expect(repository.custom?).to eq(true) }

context 'already existing repositories with changing URL' do
context 'already existing repositories with changing URL', :skip_sqlite do
subject(:repository) do
service.create_repository!(product, url, attributes, custom: custom).reload
url = 'https://foo.bar.com/bar/foo'
Expand Down

0 comments on commit 47a3723

Please sign in to comment.