Skip to content

Commit

Permalink
[FABG-723] switched temp dir to default temp dir
Browse files Browse the repository at this point in the history
Change-Id: I4b99778c053a784bde377bb0c1922dc8bd095b9b
Signed-off-by: Baha Shaaban <[email protected]>
  • Loading branch information
Baha Shaaban committed Oct 11, 2018
1 parent aa0f268 commit a3cc1c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func DistributedSignaturesTests(t *testing.T, examplecc string) {
}

func e2eCreateAndQueryChannel(t *testing.T, ordererClCtx, org1ClCtx, org2ClCtx *dsClientCtx, channelID, examplecc string) {
sigDir, err := ioutil.TempDir(".", channelID)
sigDir, err := ioutil.TempDir("", channelID)
require.NoError(t, err, "Failed to create temporary directory")
defer func() {
err = os.RemoveAll(sigDir)
Expand Down Expand Up @@ -444,10 +444,10 @@ func generateExternalChConfigSignature(t *testing.T, org, user, chConfigPath, si
cmd := exec.Command(path.Join("scripts", "generate_signature.sh"), org, user, chCfgName, sigDir)
var stderr bytes.Buffer
cmd.Stderr = &stderr
b, err := cmd.Output()
_, err := cmd.Output()
assert.NoError(t, err, "Failed to create external signature for [%s, %s, %s], script error: [%s]", org, user, chCfgName, stderr.String())

t.Logf("running generate_signature.sh script output: %s", b)
//t.Logf("running generate_signature.sh script output: %s", b)
}

func loadExternalSignature(t *testing.T, org, chConfigPath, user, sigDir string) *common.ConfigSignature {
Expand All @@ -456,7 +456,7 @@ func loadExternalSignature(t *testing.T, org, chConfigPath, user, sigDir string)
fName := path.Join(sigDir, fmt.Sprintf("%s_%s_%s_sbytes.txt.sha256", chCfgName, org, user))
sig, err := ioutil.ReadFile(fName)
require.NoError(t, err, "Failed to read signature data with ioutil.ReadFile()")
t.Logf("Signature bytes read for %s, %s, %s: '%s'", org, chCfgName, user, sig)
//t.Logf("Signature bytes read for %s, %s, %s: '%s'", org, chCfgName, user, sig)

fName = path.Join(sigDir, fmt.Sprintf("%s_%s_%s_sHeaderbytes.txt", chCfgName, org, user))
sigHeader, err := ioutil.ReadFile(fName)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/e2e/orgs/scripts/generate_signature.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ USER=$2
CH_CFG=$3
echo "CH_CFG is $CH_CFG, ORG is $ORG, USER is $USER"
KEY_PATH_DIR=${GOPATH}/src/${REPO}/test/fixtures/fabric/v1/crypto-config/peerOrganizations/${ORG}.example.com/users/${USER}\@${ORG}.example.com/msp/keystore
SIGNATURE_PATH=${GOPATH}/src/${REPO}/test/integration/e2e/orgs/$4
SIGNATURE_PATH=$4
cd $KEY_PATH_DIR
KEY_NAME=$(ls)
echo "KEY_NAME is $KEY_NAME"
Expand Down

0 comments on commit a3cc1c3

Please sign in to comment.