Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
semyon-dev committed Nov 25, 2024
1 parent 173bbd7 commit 0f6cd07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions blockchain/ethereumClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package blockchain
import (
"context"
"encoding/base64"
"go.uber.org/zap"

"github.com/singnet/snet-daemon/v5/config"

Expand Down Expand Up @@ -42,6 +43,7 @@ func CreateHTTPEthereumClient() (*EthereumClient, error) {
config.GetBlockChainHTTPEndPoint(),
rpc.WithHeader("Authorization", "Basic "+basicAuth("", config.GetString(config.BlockchainProviderApiKey))))
if err != nil {
zap.L().Error("Error creating ethereum client", zap.Error(err), zap.String("endpoint", config.GetBlockChainHTTPEndPoint()))
return nil, errors.Wrap(err, "error creating RPC client")
}

Expand Down
4 changes: 1 addition & 3 deletions blockchain/serviceMetadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,11 @@ func TestReadServiceMetaDataFromLocalFile(t *testing.T) {
}

func Test_getServiceMetaDataUrifromRegistry(t *testing.T) {
config.Validate()
_, err := getServiceMetaDataURIfromRegistry()
assert.NotNil(t, err)
config.Vip().Set(config.BlockChainNetworkSelected, "sepolia")
config.Vip().Set(config.ServiceId, "semyon_dev")
config.Vip().Set(config.OrganizationId, "semyon_dev")
err = config.Validate()
assert.Nil(t, err)
_, err = getServiceMetaDataURIfromRegistry()
assert.Nil(t, err)
}
Expand Down

0 comments on commit 0f6cd07

Please sign in to comment.