Skip to content

Commit

Permalink
Mark failing tests on SQLite
Browse files Browse the repository at this point in the history
SQLite adapter fails to provide a unique index for the convoluted chain
of ActiveRecord persistence calls that happen on
https://github.com/solidusio/solidus/blob/8b03161a1894a7d10c8d95f62c016da55027d2b0/core/app/models/spree/stock/simple_coordinator.rb#L83.

```
SQLite3::ConstraintException:
UNIQUE constraint failed: spree_shipping_rates.shipment_id, spree_shipping_rates.shipping_method_id
```

That's not a problem on production databases (MySQL & PostgreSQL), but
at least we mark the tests as failing locally.

[skip ci]
  • Loading branch information
waiting-for-dev committed May 3, 2022
1 parent 8ef1e71 commit db88911
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/spec/requests/spree/api/checkouts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ module Spree::Api
end

it "can update addresses and transition from address to delivery" do
pending "SQLite adapter fails to provide a unique index" if ActiveRecord::Base.connection.adapter_name == "SQLite"

put spree.api_checkout_path(order),
params: { order_token: order.guest_token, order: {
bill_address_attributes: address,
Expand All @@ -107,6 +109,8 @@ module Spree::Api

# Regression test for https://github.com/spree/spree/issues/4498
it "does not contain duplicate variant data in delivery return" do
pending "SQLite adapter fails to provide a unique index" if ActiveRecord::Base.connection.adapter_name == "SQLite"

put spree.api_checkout_path(order),
params: { order_token: order.guest_token, order: {
bill_address_attributes: address,
Expand Down

0 comments on commit db88911

Please sign in to comment.