Skip to content

Commit

Permalink
Merge pull request #616 from stellar/update-test-recipes
Browse files Browse the repository at this point in the history
Update test recipes with v10 offer changes
  • Loading branch information
bartekn authored Aug 27, 2018
2 parents 5bbd278 + a3a3d3a commit 7d1e810
Show file tree
Hide file tree
Showing 56 changed files with 9,533 additions and 8,208 deletions.
2 changes: 1 addition & 1 deletion services/horizon/internal/actions_offer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestOfferActions_Index(t *testing.T) {
//test last modified timestamp
var records []map[string]interface{}
ht.UnmarshalPage(w.Body, &records)
ht.Assert.Equal("2018-07-31T20:16:50Z", records[2]["last_modified_time"])
ht.Assert.Equal("2018-08-27T18:16:59Z", records[2]["last_modified_time"])
ht.Assert.EqualValues(5, records[2]["last_modified_ledger"])
}
}
182 changes: 116 additions & 66 deletions services/horizon/internal/test/scenarios/account_merge-core.sql

Large diffs are not rendered by default.

301 changes: 152 additions & 149 deletions services/horizon/internal/test/scenarios/account_merge-horizon.sql

Large diffs are not rendered by default.

242 changes: 146 additions & 96 deletions services/horizon/internal/test/scenarios/allow_trust-core.sql

Large diffs are not rendered by default.

401 changes: 202 additions & 199 deletions services/horizon/internal/test/scenarios/allow_trust-horizon.sql

Large diffs are not rendered by default.

220 changes: 135 additions & 85 deletions services/horizon/internal/test/scenarios/asset_stat_account-core.sql

Large diffs are not rendered by default.

383 changes: 193 additions & 190 deletions services/horizon/internal/test/scenarios/asset_stat_account-horizon.sql

Large diffs are not rendered by default.

208 changes: 129 additions & 79 deletions services/horizon/internal/test/scenarios/asset_stat_operations-core.sql

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

190 changes: 120 additions & 70 deletions services/horizon/internal/test/scenarios/base-core.sql

Large diffs are not rendered by default.

319 changes: 161 additions & 158 deletions services/horizon/internal/test/scenarios/base-horizon.sql

Large diffs are not rendered by default.

206 changes: 103 additions & 103 deletions services/horizon/internal/test/scenarios/bindata.go

Large diffs are not rendered by default.

204 changes: 127 additions & 77 deletions services/horizon/internal/test/scenarios/change_trust-core.sql

Large diffs are not rendered by default.

323 changes: 163 additions & 160 deletions services/horizon/internal/test/scenarios/change_trust-horizon.sql

Large diffs are not rendered by default.

290 changes: 170 additions & 120 deletions services/horizon/internal/test/scenarios/ingest_asset_stats-core.sql

Large diffs are not rendered by default.

561 changes: 282 additions & 279 deletions services/horizon/internal/test/scenarios/ingest_asset_stats-horizon.sql

Large diffs are not rendered by default.

198 changes: 124 additions & 74 deletions services/horizon/internal/test/scenarios/kahuna-2-core.sql

Large diffs are not rendered by default.

291 changes: 147 additions & 144 deletions services/horizon/internal/test/scenarios/kahuna-2-horizon.sql

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions services/horizon/internal/test/scenarios/kahuna-2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

require 'digest'
x = Digest::SHA256.digest("hello world")
key = Stellar::SignerKey.onetime_signer(x)
key = Stellar::SignerKey.hash_x(x)
set_options :onetime, signer: Stellar::Signer.new({
key: key,
weight: 1,
Expand All @@ -41,4 +41,4 @@

submit_transaction env

close_ledger #5
close_ledger #5
822 changes: 436 additions & 386 deletions services/horizon/internal/test/scenarios/kahuna-core.sql

Large diffs are not rendered by default.

1,615 changes: 809 additions & 806 deletions services/horizon/internal/test/scenarios/kahuna-horizon.sql

Large diffs are not rendered by default.

214 changes: 132 additions & 82 deletions services/horizon/internal/test/scenarios/non_native_payment-core.sql

Large diffs are not rendered by default.

363 changes: 183 additions & 180 deletions services/horizon/internal/test/scenarios/non_native_payment-horizon.sql

Large diffs are not rendered by default.

318 changes: 184 additions & 134 deletions services/horizon/internal/test/scenarios/order_books-core.sql

Large diffs are not rendered by default.

517 changes: 260 additions & 257 deletions services/horizon/internal/test/scenarios/order_books-horizon.sql

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions services/horizon/internal/test/scenarios/order_books.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use_manual_close

create_account :usd_gateway
create_account :scott, :master, "6000.0"
create_account :andrew, :master, "6000.0"
create_account :scott, :master, "10000.0"
create_account :andrew, :master, "10000.0"

close_ledger

Expand All @@ -19,24 +19,24 @@
payment :usd_gateway, :scott, ["USD", :usd_gateway, "5000.0"]
payment :usd_gateway, :andrew, ["USD", :usd_gateway, "5000.0"]

payment :usd_gateway, :scott, ["BTC", :usd_gateway, "5000.0"]
payment :usd_gateway, :andrew, ["BTC", :usd_gateway, "5000.0"]
payment :usd_gateway, :scott, ["BTC", :usd_gateway, "6000.0"]
payment :usd_gateway, :andrew, ["BTC", :usd_gateway, "6000.0"]

close_ledger

offer :scott, {buy:["USD", :usd_gateway], with: :native}, "10", "10.0"
offer :scott, {buy:["USD", :usd_gateway], with: :native}, "100", "9.0"
offer :scott, {buy:["USD", :usd_gateway], with: :native}, "1000", "5.0"
offer :scott, {buy:["USD", :usd_gateway], with: :native}, "10", "10.0" # price = 1/10; amount = 10*10 = 100
offer :scott, {buy:["USD", :usd_gateway], with: :native}, "100", "9.0" # price = 1/9; amount = 100*9 = 900
offer :scott, {buy:["USD", :usd_gateway], with: :native}, "1000", "5.0" # price = 1/5; amount = 1000*5 = 5000

offer :andrew, {sell:["USD", :usd_gateway], for: :native}, "10", "15.0"
offer :andrew, {sell:["USD", :usd_gateway], for: :native}, "100", "20.0"
offer :andrew, {sell:["USD", :usd_gateway], for: :native}, "1000", "50.0"

close_ledger

offer :scott, {buy:["USD", :usd_gateway], with: ["BTC", :usd_gateway]}, 10, "10.0"
offer :scott, {buy:["USD", :usd_gateway], with: ["BTC", :usd_gateway]}, 100, "9.0"
offer :scott, {buy:["USD", :usd_gateway], with: ["BTC", :usd_gateway]}, 1000, "5.0"
offer :scott, {buy:["USD", :usd_gateway], with: ["BTC", :usd_gateway]}, 10, "10.0" # price = 1/10; amount = 10*10 = 100
offer :scott, {buy:["USD", :usd_gateway], with: ["BTC", :usd_gateway]}, 100, "9.0" # price = 1/9; amount = 100*9 = 900
offer :scott, {buy:["USD", :usd_gateway], with: ["BTC", :usd_gateway]}, 1000, "5.0" # price = 1/5; amount = 1000*5 = 5000

offer :andrew, {sell:["USD", :usd_gateway], for: ["BTC", :usd_gateway]}, 10, "15.0"
offer :andrew, {sell:["USD", :usd_gateway], for: ["BTC", :usd_gateway]}, 100, "20.0"
Expand Down
438 changes: 244 additions & 194 deletions services/horizon/internal/test/scenarios/order_books_310-core.sql

Large diffs are not rendered by default.

Loading

0 comments on commit 7d1e810

Please sign in to comment.