Skip to content

Commit

Permalink
Add hardcoded WASM file and reference it in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Feb 16, 2024
1 parent 4b07a2b commit 6a700d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/soroban-rpc/internal/preflight/preflight_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ var mockLedgerEntries = func() []xdr.LedgerEntry {
var helloWorldContract = func() []byte {
_, filename, _, _ := runtime.Caller(0)
testDirName := path.Dir(filename)
contractFile := path.Join(testDirName, "../../../../target/wasm32-unknown-unknown/test-wasms/test_hello_world.wasm")
contractFile := path.Join(testDirName, "../../../../wasms/test_hello_world.wasm")
ret, err := os.ReadFile(contractFile)
if err != nil {
log.Fatalf("unable to read test_hello_world.wasm (%v) please run `make build-test-wasms` at the project root directory", err)
log.Fatalf("unable to read test_hello_world.wasm (%v) please get it from `soroban-tools`", err)
}
return ret
}()
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-rpc/internal/test/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const (
checkpointFrequency = 8
sorobanRPCPort = 8000
adminPort = 8080
helloWorldContractPath = "../../../../target/wasm32-unknown-unknown/test-wasms/test_hello_world.wasm"
helloWorldContractPath = "../../../../wasms/test_hello_world.wasm"
)

type TestConfig struct {
Expand Down
Binary file added wasms/test_hello_world.wasm
Binary file not shown.

0 comments on commit 6a700d0

Please sign in to comment.