mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-25 19:15:10 +00:00
add environment variable DISCOVERY_AS_LOCALHOST
Signed-off-by: Acmefocus <107723772@qq.com>
This commit is contained in:
parent
2933d88be4
commit
5b30577af3
2 changed files with 1 additions and 4 deletions
|
|
@ -18,6 +18,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
os.Setenv("DISCOVERY_AS_LOCALHOST", "true")
|
||||||
wallet, err := gateway.NewFileSystemWallet("wallet")
|
wallet, err := gateway.NewFileSystemWallet("wallet")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Failed to create wallet: %s\n", err)
|
fmt.Printf("Failed to create wallet: %s\n", err)
|
||||||
|
|
|
||||||
|
|
@ -109,12 +109,8 @@ Go:
|
||||||
Start by changing into the "go" directory:
|
Start by changing into the "go" directory:
|
||||||
cd go
|
cd go
|
||||||
|
|
||||||
Set environment variable DISCOVERY_AS_LOCALHOST to true, to indicate to ServiceDiscovery that all hostnames maps to localhost
|
|
||||||
|
|
||||||
Then, install dependencies and run the test using:
|
Then, install dependencies and run the test using:
|
||||||
go run fabcar.go
|
go run fabcar.go
|
||||||
or
|
|
||||||
./runfabcar.sh
|
|
||||||
|
|
||||||
The test will invoke the sample client app which perform the following:
|
The test will invoke the sample client app which perform the following:
|
||||||
- Import user credentials into the wallet (if they don't already exist there)
|
- Import user credentials into the wallet (if they don't already exist there)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue