Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/peer/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ func TestPluginLoadingFailure(t *testing.T) {
"ENDORSERS_ESCC",
"VALIDATORS_VSCC",
} {
plugin := plugin
t.Run(plugin, func(t *testing.T) {
cmd := exec.Command(peer, "node", "start")
cmd.Env = []string{
Expand Down
1 change: 0 additions & 1 deletion core/cclifecycle/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ func TestChaincodeInspection(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
query := &mocks.Query{}
query.On("Done")
Expand Down
6 changes: 0 additions & 6 deletions core/chaincode/lifecycle/lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,6 @@ var _ = Describe("ExternalFunctions", func() {
fakeOrg1State,
}
for i, kvs := range []MapLedgerShim{org0KVS, org1KVS} {
kvs := kvs
fakeOrgStates[i].GetStateStub = kvs.GetState
fakeOrgStates[i].GetStateHashStub = kvs.GetStateHash
fakeOrgStates[i].PutStateStub = kvs.PutState
Expand Down Expand Up @@ -1181,7 +1180,6 @@ var _ = Describe("ExternalFunctions", func() {
fakeOrg1State,
}
for i, kvs := range []MapLedgerShim{org0KVS, org1KVS} {
kvs := kvs
fakeOrgStates[i].GetStateStub = kvs.GetState
fakeOrgStates[i].GetStateHashStub = kvs.GetStateHash
fakeOrgStates[i].PutStateStub = kvs.PutState
Expand Down Expand Up @@ -1472,7 +1470,6 @@ var _ = Describe("ExternalFunctions", func() {
fakeOrg1State,
}
for i, kvs := range []MapLedgerShim{org0KVS, org1KVS} {
kvs := kvs
fakeOrgStates[i].GetStateStub = kvs.GetState
fakeOrgStates[i].GetStateHashStub = kvs.GetStateHash
fakeOrgStates[i].PutStateStub = kvs.PutState
Expand Down Expand Up @@ -1605,7 +1602,6 @@ var _ = Describe("ExternalFunctions", func() {
fakeOrg1State,
}
for i, kvs := range []MapLedgerShim{org0KVS, org1KVS} {
kvs := kvs
fakeOrgStates[i].GetStateStub = kvs.GetState
fakeOrgStates[i].GetStateHashStub = kvs.GetStateHash
fakeOrgStates[i].PutStateStub = kvs.PutState
Expand Down Expand Up @@ -1794,7 +1790,6 @@ var _ = Describe("ExternalFunctions", func() {
fakeOrg1State,
}
for i, kvs := range []MapLedgerShim{org0KVS, org1KVS} {
kvs := kvs
fakeOrgStates[i].GetStateStub = kvs.GetState
fakeOrgStates[i].GetStateHashStub = kvs.GetStateHash
fakeOrgStates[i].PutStateStub = kvs.PutState
Expand Down Expand Up @@ -1891,7 +1886,6 @@ var _ = Describe("ExternalFunctions", func() {
fakeOrg1State,
}
for i, kvs := range []MapLedgerShim{org0KVS, org1KVS} {
kvs := kvs
fakeOrgStates[i].GetStateStub = kvs.GetState
fakeOrgStates[i].GetStateHashStub = kvs.GetStateHash
fakeOrgStates[i].PutStateStub = kvs.PutState
Expand Down
1 change: 0 additions & 1 deletion core/common/ccprovider/ccprovider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ func TestInstalledCCs(t *testing.T) {
_ = testCases

for _, test := range testCases {
test := test
t.Run(test.name, func(t *testing.T) {
c := &ccprovider.CCInfoFSImpl{GetHasher: cryptoProvider}
res, err := c.ListInstalledChaincodes(path.Join(tmpDir, test.directory), test.ls, test.extractCCFromPath)
Expand Down
1 change: 0 additions & 1 deletion core/peer/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func TestPeerAddress(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
for k, v := range test.settings {
viper.Set(k, v)
Expand Down
1 change: 0 additions & 1 deletion core/peer/pkg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ func TestUpdateRootsFromConfigBlock(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
server, err := comm.NewGRPCServer("localhost:0", test.serverConfig)
require.NoError(t, err, "failed to create gRPC server")
Expand Down
1 change: 0 additions & 1 deletion discovery/client/selection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ func TestPrioritiesByHeight(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
s1 := stateInfoWithHeight(test.leftHeight)
s2 := stateInfoWithHeight(test.rightHeight)
Expand Down
2 changes: 0 additions & 2 deletions discovery/support/acl/support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ func TestConfigSequence(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
chConfig := &mocks.ChannelConfigGetter{}
r := &mocks.Resources{}
Expand Down Expand Up @@ -161,7 +160,6 @@ func TestSatisfiesPrincipal(t *testing.T) {

sup := acl.NewDiscoverySupport(&mocks.Verifier{}, &mocks.Evaluator{}, chConfig)
for _, test := range tests {
test := test
t.Run(test.testDescription, func(t *testing.T) {
test.before()
err := sup.SatisfiesPrincipal("mychannel", nil, nil)
Expand Down
1 change: 0 additions & 1 deletion discovery/support/chaincode/support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func TestSupport(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
sup := NewDiscoverySupport(&mockMetadataRetriever{res: test.input})
res := sup.PoliciesByChaincode("", "", test.collNames...)
Expand Down
1 change: 0 additions & 1 deletion discovery/support/config/support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ func TestValidateConfig(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
err := config.ValidateConfig(test.config)
require.Contains(t, test.containsError, err.Error())
Expand Down
Loading