Skip to content

Commit

Permalink
Add IMMEDIATE policy for tests that used to rely on default EOT pri…
Browse files Browse the repository at this point in the history
…or we changed the behavior in killbill/killbill#1739

With the new behavior, `EOT` policy is now honored and so if we want to keep the current assertions, we have to overwrite such policy with `IMMEDIATE` (to match prev behavior).

An alternate fix would be to keep `EOT` (default policy) and fix the tests to adjust to new behavior.
  • Loading branch information
sbrossie committed Jul 20, 2024
1 parent fe03d7d commit f40a91e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion killbill-integration-tests/core/test_catalog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def create_ao_entitlement(bp, invoice_nb, product, billing_period = 'MONTHLY', s
end

def change_ao_entitlement(ao, invoice_nb, product, billing_period = 'MONTHLY', ao_start_date = '2013-08-01', amount = 0.0, invoice_date = start_date)
ao = ao.change_plan({ productName: product, billingPeriod: billing_period, priceList: 'DEFAULT' }, @user, nil, nil, nil, nil, nil, false, @options)
ao = ao.change_plan({ productName: product, billingPeriod: billing_period, priceList: 'DEFAULT' }, @user, nil, nil, nil, 'IMMEDIATE', nil, false, @options)
check_subscription(ao, product, 'ADD_ON', billing_period, 'DEFAULT', ao_start_date, nil, ao_start_date, nil)
check_fixed_item(invoice_nb, product + '-' + billing_period.downcase, invoice_date, amount, amount)
end
Expand Down
2 changes: 1 addition & 1 deletion killbill-integration-tests/core/test_entitlement_add_on.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_cancel_bp_default_policy_in_trial
# All default, system will cancel immediately since we are still in trial
requested_date = nil
entitlement_policy = nil
billing_policy = nil
billing_policy = 'IMMEDIATE'
use_requested_date_for_billing = nil

bp.cancel(@user, nil, nil, requested_date, entitlement_policy, billing_policy, use_requested_date_for_billing, @options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_bp_cancel_default_no_ctd
# Cancel BP in trial with no arguments
requested_date = nil
entitlement_policy = nil
billing_policy = nil
billing_policy = 'IMMEDIATE'
use_requested_date_for_billing = nil
bp.cancel(@user, nil, nil, requested_date, entitlement_policy, billing_policy, use_requested_date_for_billing, @options)

Expand Down Expand Up @@ -132,7 +132,7 @@ def test_bp_cancel_entitlement_imm
# Cancel BP in trial with no arguments
requested_date = nil
entitlement_policy = 'IMMEDIATE'
billing_policy = nil
billing_policy = 'IMMEDIATE'
use_requested_date_for_billing = nil

bp.cancel(@user, nil, nil, requested_date, entitlement_policy, billing_policy, use_requested_date_for_billing, @options)
Expand Down

0 comments on commit f40a91e

Please sign in to comment.