Skip to content

Commit

Permalink
integration tests: fix integration tests for preview 10 (#4938)
Browse files Browse the repository at this point in the history
this pr fixes the invokehostfunciton_test only, sac_test and contract event tests will be addressed in separate, follow-onw pr.
  • Loading branch information
chowbao authored Jul 9, 2023
1 parent fc4b2f8 commit d083487
Show file tree
Hide file tree
Showing 17 changed files with 599 additions and 766 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/horizon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ jobs:
env:
HORIZON_INTEGRATION_TESTS_ENABLED: true
HORIZON_INTEGRATION_TESTS_CORE_MAX_SUPPORTED_PROTOCOL: ${{ matrix.protocol-version }}
PROTOCOL_20_CORE_DEBIAN_PKG_VERSION: 19.11.1-1357.e38ee728d.focal~sorobanP10
PROTOCOL_20_CORE_DOCKER_IMG: chowbao/stellar-core:19.11.1-1357.e38ee728d.focal-sorobanP10
PROTOCOL_20_CORE_DEBIAN_PKG_VERSION: 19.11.1-1371.6c004ae12.focal~soroban
PROTOCOL_20_CORE_DOCKER_IMG: sreuland/stellar-core:19.11.1-1371.6c004ae12.focal-soroban
PROTOCOL_20_SOROBAN_RPC_DOCKER_IMG: sreuland/stellar-soroban-rpc:b18a52c085206
PROTOCOL_19_CORE_DEBIAN_PKG_VERSION: 19.11.0-1323.7fb6d5e88.focal
PROTOCOL_19_CORE_DOCKER_IMG: stellar/stellar-core:19.11.0-1323.7fb6d5e88.focal
PGHOST: localhost
Expand Down Expand Up @@ -72,6 +73,14 @@ jobs:
docker pull "$PROTOCOL_${{ matrix.protocol-version }}_CORE_DOCKER_IMG"
echo HORIZON_INTEGRATION_TESTS_DOCKER_IMG="$PROTOCOL_${{ matrix.protocol-version }}_CORE_DOCKER_IMG" >> $GITHUB_ENV
- if: ${{ matrix.protocol-version == '20' }}
name: Pull and set Soroban RPC image
shell: bash
run: |
docker pull "$PROTOCOL_${{ matrix.protocol-version }}_SOROBAN_RPC_DOCKER_IMG"
echo HORIZON_INTEGRATION_TESTS_SOROBAN_RPC_DOCKER_IMG="$PROTOCOL_${{ matrix.protocol-version }}_SOROBAN_RPC_DOCKER_IMG" >> $GITHUB_ENV
echo HORIZON_INTEGRATION_TESTS_ENABLE_SOROBAN_RPC=true >> $GITHUB_ENV
- if: ${{ startsWith(matrix.ingestion-backend, 'captive-core') }}
name: Install and enable Captive Core
run: |
Expand Down
1 change: 1 addition & 0 deletions services/horizon/docker/captive-core-integration-tests.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PEER_PORT=11725
ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING=true
ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=true

UNSAFE_QUORUM=true
FAILURE_SAFETY=0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PEER_PORT=11725
ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING=true
ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=true

UNSAFE_QUORUM=true
FAILURE_SAFETY=0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ func (operation *transactionOperationWrapper) Details() (map[string]interface{},
}
details["from"] = "address"
details["address"] = address
details["salt"] = fromAddress.Salt
details["salt"] = fromAddress.Salt.String()
case xdr.ContractIdPreimageTypeContractIdPreimageFromAsset:
details["from"] = "asset"
details["asset"] = args.ContractIdPreimage.MustFromAsset().StringCanonical()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ func (s *OperationsProcessorTestSuiteLedger) TestOperationTypeInvokeHostFunction
s.Assert().Equal(details["type"], "create_contract")
s.Assert().Equal(details["from"], "address")
s.Assert().Equal(details["address"], "GB7BDSZU2Y27LYNLALKKALB52WS2IZWYBDGY6EQBLEED3TJOCVMZRH7H")
s.Assert().Equal(details["salt"], xdr.Uint256{1})
s.Assert().Equal(details["salt"], xdr.Uint256{1}.String())
})

s.T().Run("UploadContractWasm", func(t *testing.T) {
Expand Down
Loading

0 comments on commit d083487

Please sign in to comment.