Skip to content

Commit

Permalink
Fix the config path env variable
Browse files Browse the repository at this point in the history
The config path env is now named a `FABRIC_CA_HOME`, rename it to
`CA_CFG_PATH` to keep aligned with fabric (PEER_CFG_PATH and
ORDERER_CFG_PATH).

Change-Id: I6219d428d250031fe19b6b8857c59998ea18657b
Signed-off-by: Baohua Yang <[email protected]>
  • Loading branch information
yeasy committed Feb 10, 2017
1 parent c4e83c1 commit f507e2d
Show file tree
Hide file tree
Showing 18 changed files with 71 additions and 71 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ unlimited enrollments.
Executing the following fabric-ca command will generate a private key and self-signed
x509 certificate to start the fabric-ca server in the `Start the fabric-ca server` section.
These two PEM files will be generated and stored in the directory
`$FABRIC_CA_HOME`: server-cert.pem and server-key.pem.
`$CA_CFG_PATH`: server-cert.pem and server-key.pem.
They can be used as input parameters to `-ca` and `-ca-key` in the command to
start the fabric-ca server.

Expand Down Expand Up @@ -273,9 +273,9 @@ path can be specified by setting the `FABRIC_CA_CERT_FILE` environment variable
The enrollment key is stored at `$FABRIC_CA_ENROLLMENT_DIR/key.pem` by default, but a different
path can be specified by setting the `FABRIC_CA_KEY_FILE` environment variable to an absolute path name or a path relative to the current working directory.

The default value of the `FABRIC_CA_ENROLLMENT_DIR` environment variable is `$FABRIC_CA_HOME`.
The default value of the `FABRIC_CA_ENROLLMENT_DIR` environment variable is `$CA_CFG_PATH`.

The default value of the `FABRIC_CA_HOME` environment variable is `$HOME/fabric-ca`.
The default value of the `CA_CFG_PATH` environment variable is `$HOME/fabric-ca`.

### Reenroll

Expand Down
2 changes: 1 addition & 1 deletion cli/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func startServer() {
os.RemoveAll(dir)
serverStarted = true
fmt.Println("starting fabric-ca server ...")
os.Setenv("FABRIC_CA_HOME", dir)
os.Setenv("CA_CFG_PATH", dir)
go runServer()
time.Sleep(10 * time.Second)
fmt.Println("fabric-ca server started")
Expand Down
4 changes: 2 additions & 2 deletions cli/server/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ func TestInitCA(t *testing.T) {
cli.PrintCert(key, csrPEM, cert)
certerr := ioutil.WriteFile(path.Join(FCAHome, "server-cert.pem"), cert, 0755)
if certerr != nil {
log.Fatal("Error writing server-cert.pem to FABRIC_CA_HOME directory")
log.Fatal("Error writing server-cert.pem to CA_CFG_PATH directory")
}
keyerr := ioutil.WriteFile(path.Join(FCAHome, "server-key.pem"), key, 0755)
if keyerr != nil {
log.Fatal("Error writing server-key.pem to FABRIC_CA_HOME directory")
log.Fatal("Error writing server-key.pem to CA_CFG_PATH directory")
}
} else {
var ca *csr.CAConfig
Expand Down
2 changes: 1 addition & 1 deletion cli/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func startServer() {
serverStarted = true
fmt.Println("starting fabric-ca server ...")
os.Setenv("FABRIC_CA_DEBUG", "true")
os.Setenv("FABRIC_CA_HOME", dir)
os.Setenv("CA_CFG_PATH", dir)
go runServer()
time.Sleep(10 * time.Second)
fmt.Println("Fabric CA server started")
Expand Down
2 changes: 1 addition & 1 deletion cmd/fabric-ca-client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func getDefaultConfigFile() string {
var fname = fmt.Sprintf("%s-config.yaml", cmdName)
// First check home env variables
home := "."
envs := []string{"FABRIC_CA_CLIENT_HOME", "FABRIC_CA_HOME", "HOME"}
envs := []string{"FABRIC_CA_CLIENT_HOME", "CA_CFG_PATH", "HOME"}
for _, env := range envs {
envVal := os.Getenv(env)
if envVal != "" {
Expand Down
2 changes: 1 addition & 1 deletion cmd/fabric-ca-server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func getDefaultConfigFile() (string, error) {
// First check home env variables
home := os.Getenv("FABRIC_CA_SERVER_HOME")
if home == "" {
home = os.Getenv("FABRIC_CA_HOME")
home = os.Getenv("CA_CFG_PATH")
}
if home != "" {
return path.Join(home, fname), nil
Expand Down
8 changes: 4 additions & 4 deletions images/fabric-ca/Dockerfile.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM hyperledger/fabric-baseos:_BASE_TAG_
ENV FABRIC_CA_HOME /etc/hyperledger/fabric-ca
RUN mkdir -p $FABRIC_CA_HOME /var/hyperledger/fabric-ca
ENV CA_CFG_PATH /etc/hyperledger/fabric-ca
RUN mkdir -p $CA_CFG_PATH /var/hyperledger/fabric-ca
COPY payload/fabric-ca /usr/local/bin

# Copy the configuration files
ADD payload/sampleconfig.tar.bz2 $FABRIC_CA_HOME
ADD payload/sampleconfig.tar.bz2 $CA_CFG_PATH

# Copy the same certificates that are currently hardcoded into the peers
COPY payload/root.pem /.fabric-ca/root.pem
Expand All @@ -14,4 +14,4 @@ COPY payload/ec-key.pem /.fabric-ca/ec-key.pem
COPY payload/ec.pem /.fabric-ca/ec.pem

EXPOSE 7054
CMD fabric-ca server start -address 0.0.0.0 -config $FABRIC_CA_HOME/server-config.json
CMD fabric-ca server start -address 0.0.0.0 -config $CA_CFG_PATH/server-config.json
2 changes: 1 addition & 1 deletion lib/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func startServer() int {

func runServer() {
os.Setenv("FABRIC_CA_DEBUG", "true")
os.Setenv("FABRIC_CA_HOME", dir)
os.Setenv("CA_CFG_PATH", dir)
s := new(server.Server)
s.ConfigDir = tdDir
s.ConfigFile = testCfgFile
Expand Down
12 changes: 6 additions & 6 deletions scripts/fvt/enroll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $($FABRIC_TLS) && HOST="https://localhost:8888"
while getopts "du:p:t:l:x:" option; do
case "$option" in
d) FABRIC_CA_DEBUG="true" ;;
x) FABRIC_CA_HOME="$OPTARG" ;;
x) CA_CFG_PATH="$OPTARG" ;;
u) USERNAME="$OPTARG" ;;
p) USERPSWD="$OPTARG"
test -z "$USERPSWD" && AUTH=false
Expand All @@ -20,10 +20,10 @@ while getopts "du:p:t:l:x:" option; do
l) KEYLEN="$OPTARG" ;;
esac
done
test -z "$FABRIC_CA_HOME" && FABRIC_CA_HOME="$HOME/fabric-ca"
test -z "$CLIENTCERT" && CLIENTCERT="$FABRIC_CA_HOME/cert.pem"
test -z "$CLIENTKEY" && CLIENTKEY="$FABRIC_CA_HOME/key.pem"
test -f "$FABRIC_CA_HOME" || mkdir -p $FABRIC_CA_HOME
test -z "$CA_CFG_PATH" && CA_CFG_PATH="$HOME/fabric-ca"
test -z "$CLIENTCERT" && CLIENTCERT="$CA_CFG_PATH/cert.pem"
test -z "$CLIENTKEY" && CLIENTKEY="$CA_CFG_PATH/key.pem"
test -f "$CA_CFG_PATH" || mkdir -p $CA_CFG_PATH

: ${FABRIC_CA_DEBUG="false"}
: ${AUTH="true"}
Expand All @@ -35,7 +35,7 @@ $($AUTH) || unset USERPSWD

test "$KEYTYPE" = "ecdsa" && sslcmd="ec"

genClientConfig "$FABRIC_CA_HOME/client-config.json"
genClientConfig "$CA_CFG_PATH/client-config.json"
$FABRIC_CAEXEC client enroll "$USERNAME" "$USERPSWD" "$HOST" <(echo "{
\"hosts\": [
\"[email protected]\",
Expand Down
6 changes: 3 additions & 3 deletions scripts/fvt/enrollments_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ TESTDATA="$FABRIC_CA/testdata"
. $SCRIPTDIR/fabric-ca_utils
RC=0
SERVERCONFIG="/tmp/serverConfig.json"
export FABRIC_CA_HOME="$HOME/fabric-ca"
CLIENTCONFIG="$FABRIC_CA_HOME/fabric-ca/fabric-ca_client.json"
CLIENTCERT="$FABRIC_CA_HOME/cert.pem"
export CA_CFG_PATH="$HOME/fabric-ca"
CLIENTCONFIG="$CA_CFG_PATH/fabric-ca/fabric-ca_client.json"
CLIENTCERT="$CA_CFG_PATH/cert.pem"
PKI="$SCRIPTDIR/utils/pki"

MAX_ENROLL="$1"
Expand Down
2 changes: 1 addition & 1 deletion scripts/fvt/fabric-ca_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function initFabricCa() {
test -f $FABRIC_CAEXEC || ErrorExit "fabric-ca executable not found (use -B to build)"
cd $FABRIC_CA/bin

export FABRIC_CA_HOME=$HOME/fabric-ca
export CA_CFG_PATH=$HOME/fabric-ca
genInitConfig
$FABRIC_CAEXEC server init $INITCONFIG

Expand Down
2 changes: 1 addition & 1 deletion scripts/fvt/group_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $($FABRIC_TLS) && TLS="-T"
# group is required if the type is client or peer.
$SCRIPTDIR/fabric-ca_setup.sh -R
$SCRIPTDIR/fabric-ca_setup.sh -I -S -X $TLS
export FABRIC_CA_HOME=/tmp/keyStore/admin
export CA_CFG_PATH=/tmp/keyStore/admin
$SCRIPTDIR/enroll.sh -u admin -p adminpw
$SCRIPTDIR/register.sh -u user1 -t client -g bank_a
test $? -ne 0 && ErrorMsg "Failed to register user1:client:bank_a"
Expand Down
12 changes: 6 additions & 6 deletions scripts/fvt/reenroll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $($FABRIC_TLS) && HOST="https://localhost:8888"

while getopts "k:l:x:" option; do
case "$option" in
x) FABRIC_CA_HOME="$OPTARG" ;;
x) CA_CFG_PATH="$OPTARG" ;;
k) KEYTYPE="$OPTARG" ;;
l) KEYLEN="$OPTARG" ;;
esac
Expand All @@ -25,12 +25,12 @@ done
: ${KEYTYPE="ecdsa"}
: ${KEYLEN="256"}
: ${FABRIC_CA_DEBUG="false"}
test -z "$FABRIC_CA_HOME" && FABRIC_CA_HOME=$HOME/fabric-ca
CLIENTCERT="$FABRIC_CA_HOME/cert.pem"
CLIENTKEY="$FABRIC_CA_HOME/key.pem"
export FABRIC_CA_HOME
test -z "$CA_CFG_PATH" && CA_CFG_PATH=$HOME/fabric-ca
CLIENTCERT="$CA_CFG_PATH/cert.pem"
CLIENTKEY="$CA_CFG_PATH/key.pem"
export CA_CFG_PATH

genClientConfig "$FABRIC_CA_HOME/client-config.json"
genClientConfig "$CA_CFG_PATH/client-config.json"
$FABRIC_CAEXEC client reenroll $HOST <(echo "{
\"hosts\": [
\"[email protected]\",
Expand Down
38 changes: 19 additions & 19 deletions scripts/fvt/reenroll_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ future=$(date +"$next_year%m%d%H%M%SZ")
function enrollUser() {
local USERNAME=$1
mkdir -p $KEYSTORE/$USERNAME
export FABRIC_CA_HOME=$KEYSTORE/$REGISTRAR
OUT=$($SCRIPTDIR/register.sh -u $USERNAME -t $USERTYPE -g $USERGRP -x $FABRIC_CA_HOME)
export CA_CFG_PATH=$KEYSTORE/$REGISTRAR
OUT=$($SCRIPTDIR/register.sh -u $USERNAME -t $USERTYPE -g $USERGRP -x $CA_CFG_PATH)
echo "$OUT"
PASSWD="$(echo "$OUT" | head -n1 | awk '{print $NF}')"
export FABRIC_CA_HOME=$KEYSTORE/$USERNAME
test -d $FABRIC_CA_HOME || mkdir -p $FABRIC_CA_HOME
$SCRIPTDIR/enroll.sh -u $USERNAME -p $PASSWD -x $FABRIC_CA_HOME
export CA_CFG_PATH=$KEYSTORE/$USERNAME
test -d $CA_CFG_PATH || mkdir -p $CA_CFG_PATH
$SCRIPTDIR/enroll.sh -u $USERNAME -p $PASSWD -x $CA_CFG_PATH
}

while getopts "du:t:k:l:" option; do
Expand Down Expand Up @@ -79,8 +79,8 @@ trap "kill $HTTP_PID; CleanUp" INT

export FABRIC_CA_DEBUG
mkdir -p $KEYSTORE/$REGISTRAR
export FABRIC_CA_HOME=$KEYSTORE/$REGISTRAR
test -d $FABRIC_CA_HOME || mkdir -p $FABRIC_CA_HOME
export CA_CFG_PATH=$KEYSTORE/$REGISTRAR
test -d $CA_CFG_PATH || mkdir -p $CA_CFG_PATH

#for driver in sqlite3 postgres mysql; do
for driver in sqlite3 ; do
Expand All @@ -96,8 +96,8 @@ for driver in sqlite3 ; do
continue
fi

FABRIC_CA_HOME=$KEYSTORE/$REGISTRAR
$SCRIPTDIR/enroll.sh -u $REGISTRAR -p $REGISTRARPWD -x $FABRIC_CA_HOME
CA_CFG_PATH=$KEYSTORE/$REGISTRAR
$SCRIPTDIR/enroll.sh -u $REGISTRAR -p $REGISTRARPWD -x $CA_CFG_PATH
if test $? -ne 0; then
ErrorMsg "Failed to enroll $REGISTRAR"
continue
Expand All @@ -108,10 +108,10 @@ for driver in sqlite3 ; do
if test $? -ne 0; then
echo "Failed to enroll user${i}"
else
FABRIC_CA_HOME=$KEYSTORE/user${i}
test -d $FABRIC_CA_HOME || mkdir -p $FABRIC_CA_HOME
CA_CFG_PATH=$KEYSTORE/user${i}
test -d $CA_CFG_PATH || mkdir -p $CA_CFG_PATH
# user can be reenrolled even though MAX_ENROLLMENTS set to '1'
$SCRIPTDIR/reenroll.sh -x $FABRIC_CA_HOME
$SCRIPTDIR/reenroll.sh -x $CA_CFG_PATH
test $? -ne 0 && ErrorMsg "Failed to reenroll user${i}"
fi
sleep 1
Expand All @@ -134,13 +134,13 @@ for driver in sqlite3 ; do

#for cert in EXPIRED UNRIPE UNSUPPORTED; do
for cert in EXPIRED UNRIPE ; do
FABRIC_CA_HOME=$KEYSTORE/user1
cat $HOME/${cert}-cert.pem |sed -n '/BEGIN CERTIFICATE/,/END CERTIFICATE/p' > $FABRIC_CA_HOME/cert.pem
cat $HOME/${cert}-key.pem | openssl ec -outform pem -out $FABRIC_CA_HOME/key.pem
#cp $HOME/${cert}-key.pem $FABRIC_CA_HOME/key.pem
openssl ec -in $FABRIC_CA_HOME/key.pem -text
openssl x509 -in $FABRIC_CA_HOME/cert.pem -text
$SCRIPTDIR/reenroll.sh -x $FABRIC_CA_HOME
CA_CFG_PATH=$KEYSTORE/user1
cat $HOME/${cert}-cert.pem |sed -n '/BEGIN CERTIFICATE/,/END CERTIFICATE/p' > $CA_CFG_PATH/cert.pem
cat $HOME/${cert}-key.pem | openssl ec -outform pem -out $CA_CFG_PATH/key.pem
#cp $HOME/${cert}-key.pem $CA_CFG_PATH/key.pem
openssl ec -in $CA_CFG_PATH/key.pem -text
openssl x509 -in $CA_CFG_PATH/cert.pem -text
$SCRIPTDIR/reenroll.sh -x $CA_CFG_PATH
test $? -eq 0 && ErrorMsg "reenrolled user1 with unsupported cert"
done
$SCRIPTDIR/fabric-ca_setup.sh -R -x $KEYSTORE
Expand Down
12 changes: 6 additions & 6 deletions scripts/fvt/registerAndEnroll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ RC=0
function enrollUser() {
local USERNAME=$1
mkdir -p $KEYSTORE/$USERNAME
export FABRIC_CA_HOME=$KEYSTORE/admin
OUT=$($SCRIPTDIR/register.sh -u $USERNAME -t $USERTYPE -g $USERGRP -x $FABRIC_CA_HOME)
export CA_CFG_PATH=$KEYSTORE/admin
OUT=$($SCRIPTDIR/register.sh -u $USERNAME -t $USERTYPE -g $USERGRP -x $CA_CFG_PATH)
echo "$OUT"
PASSWD="$(echo "$OUT" | head -n1 | awk '{print $NF}')"
export FABRIC_CA_HOME=$KEYSTORE/$USERNAME
$SCRIPTDIR/enroll.sh -u $USERNAME -p $PASSWD -x $FABRIC_CA_HOME
export CA_CFG_PATH=$KEYSTORE/$USERNAME
$SCRIPTDIR/enroll.sh -u $USERNAME -p $PASSWD -x $CA_CFG_PATH
rc=$?
return $rc
}
Expand All @@ -40,8 +40,8 @@ done

export FABRIC_CA_DEBUG
mkdir -p $KEYSTORE/admin
export FABRIC_CA_HOME=$KEYSTORE/admin
$SCRIPTDIR/enroll.sh -u admin -p adminpw -x $FABRIC_CA_HOME
export CA_CFG_PATH=$KEYSTORE/admin
$SCRIPTDIR/enroll.sh -u admin -p adminpw -x $CA_CFG_PATH
test $? -eq 0 || ErrorExit "Failed to enroll admin"

for i in $USERNAME; do
Expand Down
20 changes: 10 additions & 10 deletions scripts/fvt/reregister_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ RC=0
function enrollUser() {
local USERNAME=$1
mkdir -p $KEYSTORE/$USERNAME
export FABRIC_CA_HOME=$KEYSTORE/$REGISTRAR
OUT=$($SCRIPTDIR/register.sh -u $USERNAME -t $USERTYPE -g $USERGRP -x $FABRIC_CA_HOME)
export CA_CFG_PATH=$KEYSTORE/$REGISTRAR
OUT=$($SCRIPTDIR/register.sh -u $USERNAME -t $USERTYPE -g $USERGRP -x $CA_CFG_PATH)
echo "$OUT"
PASSWD="$(echo $OUT | tail -n1 | awk '{print $NF}')"
export FABRIC_CA_HOME=$KEYSTORE/$USERNAME
$SCRIPTDIR/enroll.sh -u $USERNAME -p $PASSWD -x $FABRIC_CA_HOME
export CA_CFG_PATH=$KEYSTORE/$USERNAME
$SCRIPTDIR/enroll.sh -u $USERNAME -p $PASSWD -x $CA_CFG_PATH
}

while getopts "du:t:k:l:" option; do
Expand Down Expand Up @@ -52,31 +52,31 @@ trap "kill $HTTP_PID; CleanUp" INT

export FABRIC_CA_DEBUG
mkdir -p $KEYSTORE/$REGISTRAR
export FABRIC_CA_HOME=$KEYSTORE/$REGISTRAR
export CA_CFG_PATH=$KEYSTORE/$REGISTRAR

#for driver in sqlite3 postgres mysql; do
for driver in sqlite3 ; do
$SCRIPTDIR/fabric-ca_setup.sh -R -x $FABRIC_CA_HOME
$SCRIPTDIR/fabric-ca_setup.sh -R -x $CA_CFG_PATH
$SCRIPTDIR/fabric-ca_setup.sh -I -S -X -n4 -t rsa -l 2048 -d $driver
if test $? -ne 0; then
ErrorMsg "Failed to setup fabric-ca server"
continue
fi

$SCRIPTDIR/enroll.sh -u $REGISTRAR -p $REGIRSTRARPWD -x $FABRIC_CA_HOME
$SCRIPTDIR/enroll.sh -u $REGISTRAR -p $REGIRSTRARPWD -x $CA_CFG_PATH
if test $? -ne 0; then
ErrorMsg "Failed to enroll $REGISTRAR"
continue
fi

$SCRIPTDIR/register.sh -u ${USERNAME} -t $USERTYPE -g $USERGRP -x $FABRIC_CA_HOME
$SCRIPTDIR/register.sh -u ${USERNAME} -t $USERTYPE -g $USERGRP -x $CA_CFG_PATH
if test $? -ne 0; then
ErrorMsg "Failed to register $USERNAME"
continue
fi

for i in {2..8}; do
$SCRIPTDIR/register.sh -u $USERNAME -t $USERTYPE -g $USERGRP -x $FABRIC_CA_HOME
$SCRIPTDIR/register.sh -u $USERNAME -t $USERTYPE -g $USERGRP -x $CA_CFG_PATH
test $? -eq 0 && ErrorMsg "Duplicate registration of " $USERNAME
done

Expand All @@ -90,7 +90,7 @@ for driver in sqlite3 ; do
done
fi

$SCRIPTDIR/fabric-ca_setup.sh -R -x $FABRIC_CA_HOME
$SCRIPTDIR/fabric-ca_setup.sh -R -x $CA_CFG_PATH
done
kill $HTTP_PID
wait $HTTP_PID
Expand Down
4 changes: 2 additions & 2 deletions util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func HTTPResponseToString(resp *http.Response) string {
// CreateHome will create a home directory if it does not exist
func CreateHome() (string, error) {
log.Debug("CreateHome")
home := os.Getenv("FABRIC_CA_HOME")
home := os.Getenv("CA_CFG_PATH")
if home == "" {
home = os.Getenv("HOME")
if home != "" {
Expand All @@ -387,7 +387,7 @@ func CreateHome() (string, error) {

// GetDefaultHomeDir returns the default fabric-cas home
func GetDefaultHomeDir() string {
home := os.Getenv("FABRIC_CA_HOME")
home := os.Getenv("CA_CFG_PATH")
if home == "" {
home = os.Getenv("HOME")
if home != "" {
Expand Down
6 changes: 3 additions & 3 deletions util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func TestCreateHome(t *testing.T) {
}

func TestGetDefaultHomeDir(t *testing.T) {
os.Setenv("FABRIC_CA_HOME", "")
os.Setenv("CA_CFG_PATH", "")
os.Setenv("HOME", "")
home := GetDefaultHomeDir()
if home != "/var/hyperledger/fabric/dev/fabric-ca" {
Expand All @@ -179,10 +179,10 @@ func TestGetDefaultHomeDir(t *testing.T) {
t.Errorf("Incorrect $HOME (%s) path retrieved", home)
}

os.Setenv("FABRIC_CA_HOME", "/tmp")
os.Setenv("CA_CFG_PATH", "/tmp")
home = GetDefaultHomeDir()
if home != "/tmp" {
t.Errorf("Incorrect $FABRIC_CA_HOME (%s) path retrieved", home)
t.Errorf("Incorrect $CA_CFG_PATH (%s) path retrieved", home)
}

}
Expand Down

0 comments on commit f507e2d

Please sign in to comment.