Skip to content

Commit

Permalink
Better testing for hooks example
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehsan-saradar committed Jan 21, 2024
1 parent bae3db6 commit 00c2f8f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 75 deletions.
2 changes: 1 addition & 1 deletion examples/hello-world/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "github.com/ignite/cli/v28/ignite/services/plugin"
func GetCommands() []*plugin.Command {
return []*plugin.Command{
{
Use: "hello-world [command]",
Use: "hello-world",
Short: "Say hello to the world of ignite!",
},
}
Expand Down
4 changes: 2 additions & 2 deletions examples/hooks/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import "github.com/ignite/cli/v28/ignite/services/plugin"
func GetCommands() []*plugin.Command {
return []*plugin.Command{
{
Use: "hooks [command]",
Use: "hooks",
Short: "This is an example Ignite App that demonstrates usage of hooks",
Long: "To use either run \"ignite scaffold chain\" or \"ignite chain serve\" and see the output.",
Long: "To use either run \"ignite chain build\" or \"ignite chain serve\" and see the output.",
},
}
}
Binary file added examples/hooks/hooks.app
Binary file not shown.
69 changes: 0 additions & 69 deletions examples/hooks/integration/app_test.go

This file was deleted.

6 changes: 3 additions & 3 deletions examples/hooks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ func (app) Manifest(_ context.Context) (*plugin.Manifest, error) {
Name: "hooks",
Hooks: []*plugin.Hook{
{
Name: "chain-scaffold",
PlaceHookOn: "ignite scaffold chain",
Name: "chain-build",
PlaceHookOn: "ignite chain build",
},
{
Name: "chain-serve",
Expand All @@ -31,7 +31,7 @@ func (app) Manifest(_ context.Context) (*plugin.Manifest, error) {
}

func (app) Execute(ctx context.Context, c *plugin.ExecutedCommand, _ plugin.ClientAPI) error {
fmt.Println("To use either run \"ignite scaffold chain\" or \"ignite chain serve\" and see the output.")
fmt.Println("To use either run \"ignite chain build\" or \"ignite chain serve\" and see the output.")
return nil
}

Expand Down

0 comments on commit 00c2f8f

Please sign in to comment.