Skip to content

Commit 664c8ba

Browse files
committed
Configure test keyring and keyring directory
1 parent 25416fa commit 664c8ba

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

app/gitopia.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ package app
33
import (
44
"context"
55

6-
"github.com/pkg/errors"
7-
"github.com/spf13/viper"
8-
6+
sdk "github.com/cosmos/cosmos-sdk/types"
7+
"github.com/cosmos/cosmos-sdk/x/authz"
98
"github.com/gitopia/git-server/logger"
109
"github.com/gitopia/gitopia/x/gitopia/types"
10+
"github.com/pkg/errors"
11+
"github.com/spf13/viper"
1112
"github.com/tendermint/starport/starport/pkg/cosmosaccount"
1213
"github.com/tendermint/starport/starport/pkg/cosmosclient"
13-
14-
sdk "github.com/cosmos/cosmos-sdk/types"
15-
"github.com/cosmos/cosmos-sdk/x/authz"
1614
)
1715

1816
const (
@@ -37,7 +35,8 @@ func NewGitopiaClient(ctx context.Context, account string) (GitopiaClient, error
3735
client, err := cosmosclient.New(ctx,
3836
cosmosclient.WithNodeAddress(viper.GetString("tm_addr")),
3937
//cosmosclient.WithKeyringServiceName("cosmos"), // not suported on macos
40-
cosmosclient.WithKeyringBackend(cosmosaccount.KeyringOS),
38+
cosmosclient.WithKeyringBackend(cosmosaccount.KeyringTest),
39+
cosmosclient.WithHome(viper.GetString("keyring_dir")),
4140
cosmosclient.WithAddressPrefix(GITOPIA_ACC_ADDRESS_PREFIX),
4241
)
4342
if err != nil {

config_dev.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ gitopia_grpc_url = "grpc.gitopia.dev:9090"
33
git_dir = "/var/repos"
44
attachment_dir = "/var/attachments"
55
tm_addr = "http://grpc.gitopia.dev:26657"
6-
key_name = "git-server"
6+
key_name = "git-server"
7+
keyring_dir = "/home/ubuntu/git-server"

config_local.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ gitopia_grpc_url = "localhost:9090"
33
git_dir = "/var/repos"
44
attachment_dir = "/var/attachments"
55
tm_addr = "http://localhost:26657"
6-
key_name = "git-server"
6+
key_name = "git-server"
7+
keyring_dir = ""

config_prod.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ gitopia_grpc_url = "grpc.gitopia.com:9090"
33
git_dir = "/var/repos"
44
attachment_dir = "/var/attachments"
55
tm_addr = "http://grpc.gitopia.com:26657"
6-
key_name = "git-server"
6+
key_name = "git-server"
7+
keyring_dir = "/home/ubuntu/git-server"

0 commit comments

Comments
 (0)