Skip to content

Commit a45ce33

Browse files
committed
allow using '_' in proto package names
1 parent 1797af6 commit a45ce33

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

framework/components/dockercompose/chip_ingress_set/protos.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func DefaultSubjectNamingStrategy(subjectPrefix string, proto protoFile, protoSc
175175
// extractPackageNameWithRegex extracts the package name from a proto source file using regex.
176176
// It returns an error if no package name is found.
177177
func extractPackageNameWithRegex(protoSrc string) (string, error) {
178-
matches := regexp.MustCompile(`(?m)^\s*package\s+([a-zA-Z0-9.]+)\s*;`).FindStringSubmatch(protoSrc)
178+
matches := regexp.MustCompile(`(?m)^\s*package\s+([a-zA-_Z0-9.]+)\s*;`).FindStringSubmatch(protoSrc)
179179
if len(matches) < 2 {
180180
return "", fmt.Errorf("no package name found in proto source")
181181
}

framework/examples/myproject/smoke_chip_ingress_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package examples
22

33
import (
44
"context"
5+
"os"
56
"testing"
67
"time"
78

@@ -16,6 +17,7 @@ type ChipConfig struct {
1617

1718
// use config file: smoke_chip.toml
1819
func TestChipIngressSmoke(t *testing.T) {
20+
os.Setenv("CTF_CONFIGS", "smoke_chip.toml")
1921
in, err := framework.Load[ChipConfig](t)
2022
require.NoError(t, err, "failed to load config")
2123

@@ -34,7 +36,7 @@ func TestChipIngressSmoke(t *testing.T) {
3436
err := chipingressset.DefaultRegisterAndFetchProtos(ctx, nil, []chipingressset.ProtoSchemaSet{
3537
{
3638
URI: "https://github.com/smartcontractkit/chainlink-protos",
37-
Ref: "49a301ac36cad84ac8dd7fae6749d3a124b6819b",
39+
Ref: "a653ed4c82a02ec6c0d501dd5af80d02a00009db",
3840
Folders: []string{"workflows"},
3941
SubjectPrefix: "cre-",
4042
},

0 commit comments

Comments
 (0)