From 6fc2c4d302a8051212393460a286729149886828 Mon Sep 17 00:00:00 2001 From: otherview Date: Fri, 13 Oct 2023 15:49:35 +0100 Subject: [PATCH] fixing test --- tools/walletextension/test/wallet_extension_test.go | 7 +++---- tools/walletextension/wallet_extension.go | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/walletextension/test/wallet_extension_test.go b/tools/walletextension/test/wallet_extension_test.go index 7c1a92ae08..d51974d101 100644 --- a/tools/walletextension/test/wallet_extension_test.go +++ b/tools/walletextension/test/wallet_extension_test.go @@ -13,7 +13,6 @@ import ( "github.com/obscuronet/go-obscuro/go/common" "github.com/obscuronet/go-obscuro/go/rpc" "github.com/obscuronet/go-obscuro/integration" - "github.com/obscuronet/go-obscuro/tools/walletextension" "github.com/obscuronet/go-obscuro/tools/walletextension/accountmanager" "github.com/stretchr/testify/assert" @@ -150,9 +149,9 @@ func canInvokeSensitiveMethodsAfterSubmittingMultipleViewingKeys(t *testing.T, t func cannotSubscribeOverHTTP(t *testing.T, testHelper *testHelper) { respBody := makeHTTPEthJSONReq(testHelper.walletHTTPPort, rpc.Subscribe, []interface{}{rpc.SubscriptionTypeLogs}) - fmt.Println(respBody) - if string(respBody) != walletextension.ErrSubscribeFailHTTP+"\n" { - t.Fatalf("expected response of '%s', got '%s'", walletextension.ErrSubscribeFailHTTP, string(respBody)) + + if string(respBody) != "received an eth_subscribe request but the connection does not support subscriptions" { + t.Fatalf("unexpected response %s", string(respBody)) } } diff --git a/tools/walletextension/wallet_extension.go b/tools/walletextension/wallet_extension.go index 7eae24b59a..8650798736 100644 --- a/tools/walletextension/wallet_extension.go +++ b/tools/walletextension/wallet_extension.go @@ -27,8 +27,6 @@ import ( gethlog "github.com/ethereum/go-ethereum/log" ) -var ErrSubscribeFailHTTP = fmt.Sprintf("received an %s request but the connection does not support subscriptions", rpc.Subscribe) - // WalletExtension handles the management of viewing keys and the forwarding of Ethereum JSON-RPC requests. type WalletExtension struct { hostAddr string // The address on which the Obscuro host can be reached.