Skip to content
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

build(deps): use tagged version of consumer plugin (backport #4043) #4044

Merged
merged 1 commit into from
Mar 20, 2024
Merged
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
10 changes: 6 additions & 4 deletions ignite/internal/plugin/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
"github.com/ignite/cli/v28/ignite/services/plugin"
)

// TODO use released version of app-consumer.
const consumerPlugin = "github.com/ignite/apps/consumer"
const (
PluginConsumerVersion = "consumer/v0.1.0"
PluginConsumerPath = "github.com/ignite/apps/consumer@" + PluginConsumerVersion
)

// ConsumerWriteGenesis writes validators in the consumer module genesis.
// NOTE(tb): Using a plugin for this task avoids having the interchain-security
// dependency in Ignite.
func ConsumerWriteGenesis(ctx context.Context, c plugin.Chainer) error {
_, err := Execute(ctx, consumerPlugin, []string{"writeGenesis"}, plugin.WithChain(c))
_, err := Execute(ctx, PluginConsumerPath, []string{"writeGenesis"}, plugin.WithChain(c))

Check warning on line 20 in ignite/internal/plugin/consumer.go

View check run for this annotation

Codecov / codecov/patch

ignite/internal/plugin/consumer.go#L20

Added line #L20 was not covered by tests
if err != nil {
return errors.Errorf("execute consumer plugin 'writeGenesis': %w", err)
}
Expand All @@ -27,7 +29,7 @@
// NOTE(tb): Using a plugin for this task avoids having the interchain-security
// dependency in Ignite.
func ConsumerIsInitialized(ctx context.Context, c plugin.Chainer) (bool, error) {
out, err := Execute(ctx, consumerPlugin, []string{"isInitialized"}, plugin.WithChain(c))
out, err := Execute(ctx, PluginConsumerPath, []string{"isInitialized"}, plugin.WithChain(c))

Check warning on line 32 in ignite/internal/plugin/consumer.go

View check run for this annotation

Codecov / codecov/patch

ignite/internal/plugin/consumer.go#L32

Added line #L32 was not covered by tests
if err != nil {
return false, errors.Errorf("execute consumer plugin 'isInitialized': %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions ignite/internal/plugin/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func TestConsumerPlugin(t *testing.T) {
chainer.EXPECT().ConfigPath().Return("configpath").Maybe()
chainer.EXPECT().Home().Return(path, nil).Maybe()
chainer.EXPECT().RPCPublicAddress().Return("rpcPublicAddress", nil).Maybe()
_, err = Execute(context.Background(), consumerPlugin, []string{"writeGenesis"}, plugin.WithChain(chainer))
_, err = Execute(context.Background(), PluginConsumerPath, []string{"writeGenesis"}, plugin.WithChain(chainer))
require.NoError(t, err)
},
expectedOutput: "true",
Expand All @@ -117,7 +117,7 @@ func TestConsumerPlugin(t *testing.T) {

out, err := Execute(
context.Background(),
consumerPlugin,
PluginConsumerPath,
tt.args,
plugin.WithChain(chainer),
)
Expand Down
Loading