Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 470fd07

Browse files
authored
[FABG-1005] chaincoded should use distinct separator (#125)
Chaincoded removes the last segment of the chaincode ID when detecting the binary name. The last segment separator is changed to the more distinct _fabtest_. Signed-off-by: Troy Ronda <[email protected]>
1 parent 7b97fdf commit 470fd07

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

scripts/_go/src/chaincoded/cmd/chaincoded/chaincoded.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
)
3030

3131
var (
32-
binaryRegExp = regexp.MustCompile("(.*)_(.*)")
32+
binaryRegExp = regexp.MustCompile("(.*)_fabtest_(.*)")
3333
containerCreateRegEx = regexp.MustCompile("/containers/create")
3434
containerNameRegEx = regexp.MustCompile("(.*)-(.*)-(.*)-(.*)")
3535
containerStartRegEx = regexp.MustCompile("/containers/(.+)/start")

test/integration/e2e/end_to_end.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const (
3838
)
3939

4040
var (
41-
ccID = "example_cc_e2e" + metadata.TestRunID
41+
ccID = "example_cc_fabtest_e2e" + metadata.TestRunID
4242
)
4343

4444
// Run enables testing an end-to-end scenario against the supplied SDK options

test/integration/e2e/orgs/multiple_orgs_minconfig_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
)
3030

3131
const (
32-
bootStrapCC = "example_cc_btsp"
32+
bootStrapCC = "example_cc_fabtest_btsp"
3333
configFilename = "config_e2e_multiorg_bootstrap.yaml"
3434
)
3535

test/integration/e2e/orgs/multiple_orgs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ var (
6060
// Peers
6161
orgTestPeer0 fab.Peer
6262
orgTestPeer1 fab.Peer
63-
exampleCC = "example_cc_e2e" + metadata.TestRunID
63+
exampleCC = "example_cc_fabtest_e2e" + metadata.TestRunID
6464
)
6565

6666
// used to create context for different tests in the orgs package

test/integration/pkg/gateway/gateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const (
2727
)
2828

2929
var (
30-
ccID = "example_cc_e2e" + metadata.TestRunID
30+
ccID = "example_cc_fabtest_e2e" + metadata.TestRunID
3131
)
3232

3333
// RunWithConfig the basic gateway integration test

test/integration/prepare.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func GenerateExamplePvtID(randomize bool) string {
5757
suffix = GenerateRandomID()
5858
}
5959

60-
return fmt.Sprintf("%s_%s%s", examplePvtCCName, metadata.TestRunID, suffix)
60+
return fmt.Sprintf("%s_fabtest_%s%s", examplePvtCCName, metadata.TestRunID, suffix)
6161
}
6262

6363
// GenerateExampleID supplies a chaincode name for example_cc
@@ -67,7 +67,7 @@ func GenerateExampleID(randomize bool) string {
6767
suffix = GenerateRandomID()
6868
}
6969

70-
return fmt.Sprintf("%s_0%s%s", exampleCCName, metadata.TestRunID, suffix)
70+
return fmt.Sprintf("%s_fabtest_0%s%s", exampleCCName, metadata.TestRunID, suffix)
7171
}
7272

7373
// GenerateExampleJavaID supplies a java chaincode name for example_cc
@@ -77,7 +77,7 @@ func GenerateExampleJavaID(randomize bool) string {
7777
suffix = GenerateRandomID()
7878
}
7979

80-
return fmt.Sprintf("%s_0%s%s", exampleJavaCCName, metadata.TestRunID, suffix)
80+
return fmt.Sprintf("%s_fabtest_0%s%s", exampleJavaCCName, metadata.TestRunID, suffix)
8181
}
8282

8383
// GenerateExampleNodeID supplies a node chaincode name for example_cc
@@ -87,7 +87,7 @@ func GenerateExampleNodeID(randomize bool) string {
8787
suffix = GenerateRandomID()
8888
}
8989

90-
return fmt.Sprintf("%s_0%s%s", exampleNodeCCName, metadata.TestRunID, suffix)
90+
return fmt.Sprintf("%s_fabtest_0%s%s", exampleNodeCCName, metadata.TestRunID, suffix)
9191
}
9292

9393
// PrepareExampleCC install and instantiate using resource management client

0 commit comments

Comments
 (0)