diff --git a/app/e2e_include_upgrades.go b/app/e2e_code.go similarity index 55% rename from app/e2e_include_upgrades.go rename to app/e2e_code.go index 6f5770be5..eebe4ce39 100644 --- a/app/e2e_include_upgrades.go +++ b/app/e2e_code.go @@ -1,13 +1,18 @@ //go:build e2e +// This file contains code specific to end-to-end (e2e) testing for the Babylon application. +// It includes the signet upgrade and enables integration. + package app import ( "github.com/babylonlabs-io/babylon/app/upgrades/signetlaunch" + zctypes "github.com/babylonlabs-io/babylon/x/zonecaching/types" ) // init is used to include signet upgrade used for e2e testing // this file should be removed once the upgrade testing with signet ends. func init() { Upgrades = append(Upgrades, signetlaunch.Upgrade) + zctypes.EnableIntegration = true } diff --git a/x/zoneconcierge/keeper/keeper_test.go b/x/zoneconcierge/keeper/keeper_test.go index a552219b8..fb7ee5db2 100644 --- a/x/zoneconcierge/keeper/keeper_test.go +++ b/x/zoneconcierge/keeper/keeper_test.go @@ -4,12 +4,16 @@ import ( "context" "math/rand" - ibctmtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - "github.com/babylonlabs-io/babylon/testutil/datagen" zckeeper "github.com/babylonlabs-io/babylon/x/zoneconcierge/keeper" + zctypes "github.com/babylonlabs-io/babylon/x/zoneconcierge/types" + ibctmtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" ) +func init() { + zctypes.EnableIntegration = true +} + // SimulateNewHeaders generates a non-zero number of canonical headers func SimulateNewHeaders(ctx context.Context, r *rand.Rand, k *zckeeper.Keeper, consumerID string, startHeight uint64, numHeaders uint64) []*ibctmtypes.Header { headers := []*ibctmtypes.Header{} diff --git a/x/zoneconcierge/module.go b/x/zoneconcierge/module.go index 5fcc64a16..417a16628 100644 --- a/x/zoneconcierge/module.go +++ b/x/zoneconcierge/module.go @@ -2,10 +2,11 @@ package zoneconcierge import ( "context" - "cosmossdk.io/core/appmodule" "encoding/json" "fmt" + "cosmossdk.io/core/appmodule" + "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -119,8 +120,10 @@ func (AppModule) QuerierRoute() string { return types.RouterKey } // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries func (am AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) - types.RegisterQueryServer(cfg.QueryServer(), am.keeper) + if types.EnableIntegration { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), am.keeper) + } } // RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) diff --git a/x/zoneconcierge/types/btc_timestamp_test.go b/x/zoneconcierge/types/btc_timestamp_test.go index 4d62fe195..c214caeda 100644 --- a/x/zoneconcierge/types/btc_timestamp_test.go +++ b/x/zoneconcierge/types/btc_timestamp_test.go @@ -19,6 +19,10 @@ import ( "github.com/babylonlabs-io/babylon/x/zoneconcierge/types" ) +func init() { + types.EnableIntegration = true +} + func signBLSWithBitmap(blsSKs []bls12381.PrivateKey, bm bitmap.Bitmap, msg []byte) (bls12381.Signature, error) { sigs := []bls12381.Signature{} for i := 0; i < len(blsSKs); i++ {