-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix(buf): set correct prefix for api (#4198) (cherry picked from commit 1316d69) # Conflicts: # ignite/templates/app/files/proto/buf.gen.pulsar.yaml # ignite/templates/app/files/proto/buf.gen.pulsar.yaml.plush # ignite/templates/app/files/{{protoDir}}/buf.gen.pulsar.yaml # ignite/templates/app/proto_test.go # integration/app/cmd_proto_path_test.go * conflicts * go mod tidy --------- Co-authored-by: Julien Robert <[email protected]>
- Loading branch information
1 parent
8cebfc3
commit e7d9e6a
Showing
4 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//go:build !relayer | ||
|
||
package app_test | ||
|
||
import ( | ||
"os" | ||
"path/filepath" | ||
"strings" | ||
"testing" | ||
|
||
envtest "github.com/ignite/cli/v28/integration" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
// TestGenerateAppCheckBufPulsarPath tests scaffolding a new chain and checks if the buf.gen.pulsar.yaml file is correct | ||
func TestGenerateAppCheckBufPulsarPath(t *testing.T) { | ||
var ( | ||
env = envtest.New(t) | ||
app = env.Scaffold("github.com/test/blog") | ||
) | ||
|
||
bufGenPulsarPath := filepath.Join(app.SourcePath(), "proto", "buf.gen.pulsar.yaml") | ||
_, statErr := os.Stat(bufGenPulsarPath) | ||
require.False(t, os.IsNotExist(statErr), "buf.gen.pulsar.yaml should be scaffolded") | ||
|
||
result, err := os.ReadFile(bufGenPulsarPath) | ||
require.NoError(t, err) | ||
|
||
require.True(t, strings.Contains(string(result), "default: github.com/test/blog/api"), "buf.gen.pulsar.yaml should contain the correct api override") | ||
|
||
app.EnsureSteady() | ||
} |