File tree 4 files changed +13
-13
lines changed
internal/mode/static/nginx/config
4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -99,11 +99,11 @@ func TestGenerate(t *testing.T) {
99
99
g .Expect (httpCfg ).To (ContainSubstring ("upstream" ))
100
100
g .Expect (httpCfg ).To (ContainSubstring ("split_clients" ))
101
101
102
- g .Expect (httpCfg ).To (ContainSubstring (` endpoint " 1.2.3.4:123";` ))
103
- g .Expect (httpCfg ).To (ContainSubstring (` interval "5s";` ))
102
+ g .Expect (httpCfg ).To (ContainSubstring (" endpoint 1.2.3.4:123;" ))
103
+ g .Expect (httpCfg ).To (ContainSubstring (" interval 5s;" ))
104
104
g .Expect (httpCfg ).To (ContainSubstring ("batch_size 512;" ))
105
105
g .Expect (httpCfg ).To (ContainSubstring ("batch_count 4;" ))
106
- g .Expect (httpCfg ).To (ContainSubstring (` otel_service_name " ngf:gw-ns:gw-name:my-name";` ))
106
+ g .Expect (httpCfg ).To (ContainSubstring (" otel_service_name ngf:gw-ns:gw-name:my-name;" ))
107
107
108
108
g .Expect (files [2 ].Path ).To (Equal ("/etc/nginx/conf.d/matches.json" ))
109
109
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ package config
2
2
3
3
const otelTemplateText = `
4
4
otel_exporter {
5
- endpoint " {{ .Endpoint }}" ;
5
+ endpoint {{ .Endpoint }};
6
6
{{- if .Interval }}
7
- interval " {{ .Interval }}" ;
7
+ interval {{ .Interval }};
8
8
{{- end }}
9
9
{{- if .BatchSize }}
10
10
batch_size {{ .BatchSize }};
@@ -14,7 +14,7 @@ otel_exporter {
14
14
{{- end }}
15
15
}
16
16
17
- otel_service_name " {{ .ServiceName }}" ;
17
+ otel_service_name {{ .ServiceName }};
18
18
19
19
{{- range $attr := .SpanAttributes }}
20
20
otel_span_attr "{{ $attr.Key }}" "{{ $attr.Value }}";
Original file line number Diff line number Diff line change @@ -32,12 +32,12 @@ func TestExecuteTelemetry(t *testing.T) {
32
32
33
33
g := NewWithT (t )
34
34
expSubStrings := map [string ]int {
35
- ` endpoint " 1.2.3.4:123";` : 1 ,
36
- ` otel_service_name " ngf:gw-ns:gw-name:my-name";` : 1 ,
37
- ` interval "5s";` : 1 ,
38
- "batch_size 512;" : 1 ,
39
- "batch_count 4;" : 1 ,
40
- "otel_span_attr" : 2 ,
35
+ " endpoint 1.2.3.4:123;" : 1 ,
36
+ " otel_service_name ngf:gw-ns:gw-name:my-name;" : 1 ,
37
+ " interval 5s;" : 1 ,
38
+ "batch_size 512;" : 1 ,
39
+ "batch_count 4;" : 1 ,
40
+ "otel_span_attr" : 2 ,
41
41
}
42
42
43
43
for expSubStr , expCount := range expSubStrings {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const (
23
23
24
24
var alphaNumericStringFmtRegexp = regexp .MustCompile ("^" + alphaNumericStringFmt + "$" )
25
25
26
- // ValidateServiceName validates a k8s service name that can only use alphanumeric characters.
26
+ // ValidateServiceName validates a service name that can only use alphanumeric characters.
27
27
func (GenericValidator ) ValidateServiceName (name string ) error {
28
28
if ! alphaNumericStringFmtRegexp .MatchString (name ) {
29
29
examples := []string {
You can’t perform that action at this time.
0 commit comments