Skip to content

Commit

Permalink
Merge branch 'main' into txn-db-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya1702 authored Dec 17, 2024
2 parents 6ea04ae + 5ab1975 commit 03ac6c9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ jobs:

# system test will build quickstart image internally to use for running the service stack
# configured in standalone network mode(core, rpc)
SYSTEM_TEST_QUICKSTART_GIT_REF: https://github.com/stellar/quickstart.git#1a831b2350dd3928b60eb745d0862ee19dd2aaaa
# triggers system test to log out details from quickstart's logs and test steps
SYSTEM_TEST_QUICKSTART_GIT_REF: https://github.com/stellar/quickstart.git#8ba15a3208a892f338a5927f67f3187065517c55 # triggers system test to log out details from quickstart's logs and test steps
SYSTEM_TEST_VERBOSE_OUTPUT: "true"

# the soroban test cases will compile various contracts from the examples repo
SYSTEM_TEST_SOROBAN_EXAMPLES_GIT_HASH: "v21.6.0"
SYSTEM_TEST_SOROBAN_EXAMPLES_GIT_REPO: "https://github.com/stellar/soroban-examples.git"

PROTOCOL_VERSION_DEFAULT: 21
steps:
- uses: actions/checkout@v4
name: checkout system-test
Expand Down Expand Up @@ -99,6 +100,7 @@ jobs:
JS_STELLAR_SDK_REF="file:/home/tester/js-stellar-sdk"; \
fi
make \
PROTOCOL_VERSION_DEFAULT=$PROTOCOL_VERSION_DEFAULT \
CORE_GIT_REF=$SYSTEM_TEST_CORE_GIT_REF \
CORE_COMPILE_CONFIGURE_FLAGS="$SYSTEM_TEST_CORE_COMPILE_CONFIGURE_FLAGS" \
CORE_IMAGE=$SYSTEM_TEST_CORE_IMAGE \
Expand All @@ -112,7 +114,8 @@ jobs:
build
- name: Run system test scenarios
run: |
docker run --rm -t --name e2e_test stellar/system-test:dev \
docker run -e PROTOCOL_VERSION_DEFAULT=$PROTOCOL_VERSION_DEFAULT \
--rm -t --name e2e_test stellar/system-test:dev \
--VerboseOutput $SYSTEM_TEST_VERBOSE_OUTPUT \
--TestFilter "${{ matrix.scenario-filter }}" \
--SorobanExamplesGitHash $SYSTEM_TEST_SOROBAN_EXAMPLES_GIT_HASH \
Expand Down
21 changes: 11 additions & 10 deletions cmd/stellar-rpc/internal/integrationtest/infrastructure/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/mod/semver"

"github.com/stellar/go/clients/stellarcore"
"github.com/stellar/go/keypair"
Expand Down Expand Up @@ -340,12 +341,19 @@ func (i *Test) waitForRPC() {
)
}

const versionAfterStellarRPCRename = "22.1.1"

func (i *Test) generateCaptiveCoreCfgForContainer() {
getOldVersionCaptiveCoreConfigVersion := func(dir string, filename string) ([]byte, error) {
// TODO: to be removed once we go over the stellar-rpc renaming
prefix := "stellar-rpc"
if semver.Compare("v"+i.rpcContainerVersion, "v"+versionAfterStellarRPCRename) < 0 {
prefix = "soroban-rpc"
}
arg := fmt.Sprintf(
"v%s:./soroban-rpc/internal/integrationtest/infrastructure/%s/%s",
i.rpcContainerVersion, dir,
"v%s:./%s/internal/integrationtest/infrastructure/%s/%s",
i.rpcContainerVersion,
prefix,
dir,
filename)
cmd := exec.Command("git", "show", arg)
cmd.Dir = GetCurrentDirectory() + "/../../../../"
Expand All @@ -354,13 +362,6 @@ func (i *Test) generateCaptiveCoreCfgForContainer() {

// Get old version of captive-core-integration-tests.cfg.tmpl
out, err := getOldVersionCaptiveCoreConfigVersion("docker", captiveCoreConfigTemplateFilename)
if err != nil {
// Try the directory before the integration test refactoring
// TODO: remove this hack after protocol 22 is released
out, err = getOldVersionCaptiveCoreConfigVersion("../../test", captiveCoreConfigFilename)
outStr := strings.Replace(string(out), `ADDRESS="localhost"`, `ADDRESS="${CORE_HOST_PORT}"`, -1)
out = []byte(outStr)
}
require.NoError(i.t, err)
i.generateCaptiveCoreCfg(out, inContainerCaptiveCorePort, inContainerCoreHostname)
}
Expand Down
9 changes: 0 additions & 9 deletions cmd/stellar-rpc/internal/integrationtest/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ func TestMigrate(t *testing.T) {
t.Skip("Only test this for the latest protocol: ", infrastructure.MaxSupportedProtocolVersion)
}
for _, originVersion := range getCurrentProtocolReleasedVersions(t) {
if originVersion == "21.1.0" {
// This version of the RPC container fails to even start with its captive core companion file
// (it fails Invalid configuration: DEPRECATED_SQL_LEDGER_STATE not set.)
continue
}
if originVersion == "21.3.0" {
// This version of RPC wasn't published as a docker container
continue
}
if originVersion == "22.0.0-rc2" || originVersion == "22.0.0-rc3" {
// This version of RPC wasn't published as a docker container w/ this tag
continue
Expand Down

0 comments on commit 03ac6c9

Please sign in to comment.