From 6a700d0a78609dc8445ba411ac0fbde41c381cda Mon Sep 17 00:00:00 2001 From: George Kudrayvtsev Date: Fri, 16 Feb 2024 14:50:33 -0800 Subject: [PATCH] Add hardcoded WASM file and reference it in tests --- .../internal/preflight/preflight_test.go | 4 ++-- cmd/soroban-rpc/internal/test/integration.go | 2 +- wasms/test_hello_world.wasm | Bin 0 -> 6796 bytes 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100755 wasms/test_hello_world.wasm diff --git a/cmd/soroban-rpc/internal/preflight/preflight_test.go b/cmd/soroban-rpc/internal/preflight/preflight_test.go index 57a2e82b..601901ff 100644 --- a/cmd/soroban-rpc/internal/preflight/preflight_test.go +++ b/cmd/soroban-rpc/internal/preflight/preflight_test.go @@ -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 }() diff --git a/cmd/soroban-rpc/internal/test/integration.go b/cmd/soroban-rpc/internal/test/integration.go index d3755a9c..25096cda 100644 --- a/cmd/soroban-rpc/internal/test/integration.go +++ b/cmd/soroban-rpc/internal/test/integration.go @@ -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 { diff --git a/wasms/test_hello_world.wasm b/wasms/test_hello_world.wasm new file mode 100755 index 0000000000000000000000000000000000000000..b3731d44efd34f6042fbb85a9c9c23a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