Skip to content

Bug: newBranch created for E2E test failure with new namespace #1686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b5a216b
Fix CVE-2024-45338
EnriqueL8 Dec 19, 2024
8279270
Merge pull request #1613 from dodo920306/fix-typo
EnriqueL8 Jan 9, 2025
2331c04
Update Dockerfile Curl
EnriqueL8 Jan 9, 2025
e1c73d2
fix go sum for fabric chaincode-go
EnriqueL8 Jan 9, 2025
f4977aa
Update reference config doc site
EnriqueL8 Jan 9, 2025
8969cb4
chore: update actions
ryjones Jan 8, 2025
cbdd119
fix e2e fabric contract test
EnriqueL8 Jan 9, 2025
d1c61be
Merge pull request #1605 from hyperledger/CVE-2024-45338
EnriqueL8 Jan 13, 2025
1079616
Bug: E2E test failure with new namespace
aceppaluni Jan 22, 2025
ed7ae09
Removed calls to reset
aceppaluni Jan 29, 2025
b3b5b2c
Bug: E2E test failure with new namespace
aceppaluni Jan 22, 2025
f0a5c2f
Removed calls to reset
aceppaluni Jan 29, 2025
b4d7987
Merge branch 'hyperledger:main' into main
aceppaluni Mar 4, 2025
304aba3
Merge branch 'main' of https://github.com/aceppaluni/firefly
aceppaluni Mar 4, 2025
1b14d78
Merge remote-tracking branch 'upstream/main'
aceppaluni Mar 4, 2025
c39f872
Merge branch 'main' of https://github.com/aceppaluni/firefly
aceppaluni Mar 11, 2025
012a747
Merge branch 'main' of https://github.com/aceppaluni/firefly
aceppaluni Mar 12, 2025
ab3f0f8
Merge branch 'main' of https://github.com/aceppaluni/firefly
aceppaluni Mar 13, 2025
daab9af
commit corrections
aceppaluni Mar 13, 2025
b0cec2a
new branch from E2E test failure with namespace addition
aceppaluni May 22, 2025
899af9f
removed binaries and rebased
aceppaluni May 22, 2025
1449d49
corrected call to reset in coreconfig
aceppaluni Jun 2, 2025
c1bab65
Your commit message
aceppaluni Jun 5, 2025
9be8d24
Merge branch 'hyperledger:main' into newBranch
aceppaluni Jun 18, 2025
f843d37
Merge branch 'hyperledger:main' into newBranch
aceppaluni Jul 3, 2025
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
smart_contracts/ethereum/solidity_firefly/node_modules
smart_contracts/ethereum/solidity_firefly/build
smart_contracts/fabric/custompin-sample/custompin_sample
smart_contracts/fabric/firefly-go/chaincode-go
utils/kat-client/node_modules
**/*.jar
/firefly
Expand Down
1 change: 0 additions & 1 deletion cmd/firefly.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ func init() {
}

func resetConfig() {
coreconfig.Reset()
namespace.InitConfig()
apiserver.InitConfig()
}
Expand Down
1 change: 0 additions & 1 deletion doc-site/config_docs_generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (

func TestGenerateConfigDocs(t *testing.T) {
// Initialize config of all plugins
coreconfig.Reset()
namespace.InitConfig()
apiserver.InitConfig()
f, err := os.Create(filepath.Join("docs", "reference", "config.md"))
Expand Down
1 change: 0 additions & 1 deletion doc-site/config_docs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (

func TestConfigDocsUpToDate(t *testing.T) {
// Initialize config of all plugins
coreconfig.Reset()
namespace.InitConfig()
apiserver.InitConfig()
generatedConfig, err := config.GenerateConfigMarkdown(context.Background(), configDocHeader, config.GetKnownKeys())
Expand Down
7 changes: 0 additions & 7 deletions internal/apiserver/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import (
const configDir = "../../test/data/config"

func newTestServer() (*namespacemocks.Manager, *orchestratormocks.Orchestrator, *apiServer) {
coreconfig.Reset()
InitConfig()
mgr := &namespacemocks.Manager{}
o := &orchestratormocks.Orchestrator{}
Expand Down Expand Up @@ -81,7 +80,6 @@ func newTestSPIServer() (*orchestratormocks.Orchestrator, *mux.Router) {
}

func TestStartStopServer(t *testing.T) {
coreconfig.Reset()
metrics.Clear()
InitConfig()
apiConfig.Set(httpserver.HTTPConfPort, 0)
Expand All @@ -100,7 +98,6 @@ func TestStartStopServer(t *testing.T) {
}

func TestStartLegacyAdminConfig(t *testing.T) {
coreconfig.Reset()
metrics.Clear()
InitConfig()
apiConfig.Set(httpserver.HTTPConfPort, 0)
Expand All @@ -119,7 +116,6 @@ func TestStartLegacyAdminConfig(t *testing.T) {
}

func TestStartAPIFail(t *testing.T) {
coreconfig.Reset()
metrics.Clear()
InitConfig()
apiConfig.Set(httpserver.HTTPConfAddress, "...://")
Expand All @@ -132,7 +128,6 @@ func TestStartAPIFail(t *testing.T) {
}

func TestStartAdminFail(t *testing.T) {
coreconfig.Reset()
metrics.Clear()
InitConfig()
spiConfig.Set(httpserver.HTTPConfAddress, "...://")
Expand All @@ -148,7 +143,6 @@ func TestStartAdminFail(t *testing.T) {
}

func TestStartAdminWSHandler(t *testing.T) {
coreconfig.Reset()
metrics.Clear()
InitConfig()
spiConfig.Set(httpserver.HTTPConfAddress, "...://")
Expand All @@ -167,7 +161,6 @@ func TestStartAdminWSHandler(t *testing.T) {
}

func TestStartMetricsFail(t *testing.T) {
coreconfig.Reset()
metrics.Clear()
InitConfig()
monitoringConfig.Set(httpserver.HTTPConfAddress, "...://")
Expand Down
1 change: 0 additions & 1 deletion internal/apiserver/swagger_check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
)

func TestDiffSwaggerYAML(t *testing.T) {
coreconfig.Reset()
config.Set(coreconfig.APIOASPanicOnMissingDescription, true)
as := &apiServer{}
hf := as.handlerFactory()
Expand Down
1 change: 0 additions & 1 deletion internal/apiserver/swagger_generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import (
)

func TestDownloadSwaggerYAML(t *testing.T) {
coreconfig.Reset()
config.Set(coreconfig.APIOASPanicOnMissingDescription, true)
as := &apiServer{}
hf := as.handlerFactory()
Expand Down
5 changes: 0 additions & 5 deletions internal/assets/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ func newTestAssetsWithMetrics(t *testing.T) (*assetManager, func()) {
}

func newTestAssetsCommon(t *testing.T, metrics bool) (*assetManager, func()) {
coreconfig.Reset()
mdi := &databasemocks.Plugin{}
mim := &identitymanagermocks.Manager{}
mdm := &datamocks.Manager{}
Expand Down Expand Up @@ -91,7 +90,6 @@ func TestInitFail(t *testing.T) {

func TestCacheInitFail(t *testing.T) {
cacheInitError := errors.New("Initialization error.")
coreconfig.Reset()
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mim := &identitymanagermocks.Manager{}
Expand Down Expand Up @@ -163,7 +161,6 @@ func TestGetTokenConnectors(t *testing.T) {
}

func TestStart(t *testing.T) {
coreconfig.Reset()
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mim := &identitymanagermocks.Manager{}
Expand Down Expand Up @@ -193,7 +190,6 @@ func TestStart(t *testing.T) {
}

func TestStartDBError(t *testing.T) {
coreconfig.Reset()
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mim := &identitymanagermocks.Manager{}
Expand All @@ -216,7 +212,6 @@ func TestStartDBError(t *testing.T) {
}

func TestStartError(t *testing.T) {
coreconfig.Reset()
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mim := &identitymanagermocks.Manager{}
Expand Down
1 change: 0 additions & 1 deletion internal/batch/batch_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import (
)

func testConfigReset() {
coreconfig.Reset()
config.Set(coreconfig.BatchManagerMinimumPollDelay, "0")
log.SetLevel("debug")
}
Expand Down
7 changes: 0 additions & 7 deletions internal/batch/batch_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func (tce *testConflictError) IsConflictError() bool {

func TestUnfilledBatch(t *testing.T) {
log.SetLevel("debug")
coreconfig.Reset()

dispatched := make(chan *DispatchPayload)
cancel, mdi, bp := newTestBatchProcessor(t, func(c context.Context, state *DispatchPayload) error {
Expand Down Expand Up @@ -154,7 +153,6 @@ func TestHandleDispatchConflictError(t *testing.T) {

func TestBatchSizeOverflow(t *testing.T) {
log.SetLevel("debug")
coreconfig.Reset()

dispatched := make(chan *DispatchPayload)
cancel, mdi, bp := newTestBatchProcessor(t, func(c context.Context, state *DispatchPayload) error {
Expand Down Expand Up @@ -553,7 +551,6 @@ func TestStartQuiesceNonBlocking(t *testing.T) {

func TestMarkMessageDispatchedUnpinnedOK(t *testing.T) {
log.SetLevel("debug")
coreconfig.Reset()

dispatched := make(chan *DispatchPayload)
cancel, mdi, bp := newTestBatchProcessor(t, func(c context.Context, state *DispatchPayload) error {
Expand Down Expand Up @@ -611,7 +608,6 @@ func TestMarkMessageDispatchedUnpinnedOK(t *testing.T) {

func TestMaskContextsRetryAfterPinsAssigned(t *testing.T) {
log.SetLevel("debug")
coreconfig.Reset()

dispatched := make(chan *DispatchPayload)
cancel, mdi, bp := newTestBatchProcessor(t, func(c context.Context, state *DispatchPayload) error {
Expand Down Expand Up @@ -681,7 +677,6 @@ func TestMaskContextsRetryAfterPinsAssigned(t *testing.T) {

func TestMaskContextsUpdateMessageFail(t *testing.T) {
log.SetLevel("debug")
coreconfig.Reset()

dispatched := make(chan *DispatchPayload)
cancel, mdi, bp := newTestBatchProcessor(t, func(c context.Context, state *DispatchPayload) error {
Expand Down Expand Up @@ -720,7 +715,6 @@ func TestMaskContextsUpdateMessageFail(t *testing.T) {
}

func TestSealBatchTXAlreadyAssigned(t *testing.T) {
coreconfig.Reset()

dispatched := make(chan *DispatchPayload)
cancel, mdi, bp := newTestBatchProcessor(t, func(c context.Context, state *DispatchPayload) error {
Expand Down Expand Up @@ -831,7 +825,6 @@ func TestCalculateContextsLoadPinsFail(t *testing.T) {

func TestBigBatchEstimate(t *testing.T) {
log.SetLevel("debug")
coreconfig.Reset()

bd := []byte(`{
"id": "37ba893b-fcfa-4cf9-8ce8-34cd8bc9bc72",
Expand Down
1 change: 0 additions & 1 deletion internal/blockchain/ethereum/address_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
)

func utAddresResolverConfig() config.Section {
coreconfig.Reset()
config := config.RootSection("utaddressresovler")
(&Ethereum{}).InitConfig(config)
return config.SubSection(AddressResolverConfigKey)
Expand Down
1 change: 0 additions & 1 deletion internal/blockchain/ethereum/ethereum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ func testFFIErrors() []*fftypes.FFIError {
}

func resetConf(e *Ethereum) {
coreconfig.Reset()
e.InitConfig(utConfig)
}

Expand Down
1 change: 0 additions & 1 deletion internal/blockchain/fabric/fabric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ var (
)

func resetConf(e *Fabric) {
coreconfig.Reset()
e.InitConfig(utConfig)
}

Expand Down
1 change: 0 additions & 1 deletion internal/blockchain/tezos/address_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
)

func utAddresResolverConfig() config.Section {
coreconfig.Reset()
config := config.RootSection("utaddressresovler")
(&Tezos{}).InitConfig(config)
return config.SubSection(AddressResolverConfigKey)
Expand Down
1 change: 0 additions & 1 deletion internal/blockchain/tezos/tezos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func testFFIMethod() *fftypes.FFIMethod {
}

func resetConf(t *Tezos) {
coreconfig.Reset()
t.InitConfig(utConfig)
}

Expand Down
1 change: 0 additions & 1 deletion internal/broadcast/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import (
)

func newTestBroadcastCommon(t *testing.T, metricsEnabled bool) (*broadcastManager, func()) {
coreconfig.Reset()
mdi := &databasemocks.Plugin{}
mim := &identitymanagermocks.Manager{}
mdm := &datamocks.Manager{}
Expand Down
4 changes: 0 additions & 4 deletions internal/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
)

func TestNewCacheCreationFail(t *testing.T) {
coreconfig.Reset()
ctx := context.Background()
cacheManager := NewCacheManager(ctx)
_, err := cacheManager.GetCache(NewCacheConfig(ctx, "", "", ""))
Expand All @@ -41,7 +40,6 @@ func TestNewCacheCreationFail(t *testing.T) {
}

func TestGetCacheReturnsSameCacheForSameConfig(t *testing.T) {
coreconfig.Reset()
ctx := context.Background()
cacheManager := NewCacheManager(ctx)
cache0, _ := cacheManager.GetCache(NewCacheConfig(ctx, "cache.batch.limit", "cache.batch.ttl", "testnamespace"))
Expand All @@ -57,7 +55,6 @@ func TestGetCacheReturnsSameCacheForSameConfig(t *testing.T) {
}

func TestTwoSeparateCacheWorksIndependently(t *testing.T) {
coreconfig.Reset()
ctx := context.Background()
cacheManager := NewCacheManager(ctx)
cache0, _ := cacheManager.GetCache(NewCacheConfig(ctx, "cache.batch.limit", "cache.batch.ttl", ""))
Expand Down Expand Up @@ -93,7 +90,6 @@ func TestUmmanagedCacheInstance(t *testing.T) {
}

func TestResetCachesForNamespace(t *testing.T) {
coreconfig.Reset()
ctx := context.Background()
cacheManager := NewCacheManager(ctx)
cacheNS1, _ := cacheManager.GetCache(NewCacheConfig(ctx, "cache.batch.limit", "cache.batch.ttl", "ns1"))
Expand Down
Loading
Loading