File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
collector/nginxossreceiver/internal/scraper/stubstatus Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ Reading: 6 Writing: 179 Waiting: 106
74
74
defer server .Close ()
75
75
76
76
// Test with TLS configuration using our self-signed certificate
77
- t .Run ("with self-signed TLS" , func (t * testing.T ) {
77
+ t .Run ("Test 1: self-signed TLS" , func (t * testing.T ) {
78
78
cfg , ok := config .CreateDefaultConfig ().(* config.Config )
79
79
require .True (t , ok )
80
80
@@ -134,7 +134,7 @@ Reading: 6 Writing: 179 Waiting: 106
134
134
})
135
135
136
136
// Test with Unix socket
137
- t .Run ("with Unix socket" , func (t * testing.T ) {
137
+ t .Run ("Test 1: Unix socket" , func (t * testing.T ) {
138
138
cfg , ok := config .CreateDefaultConfig ().(* config.Config )
139
139
require .True (t , ok )
140
140
Original file line number Diff line number Diff line change @@ -652,7 +652,7 @@ func (ncp *NginxConfigParser) urlsForLocationDirectiveAPIDetails(
652
652
caCertLocation := ""
653
653
// If SSl is enabled, check if CA cert is provided and the location is allowed
654
654
if isSSL {
655
- caCertLocation = ncp .getCACertLocation (ctx )
655
+ caCertLocation = ncp .selfSignedCACertLocation (ctx )
656
656
}
657
657
// process from the location block
658
658
if current .Directive != locationDirective {
@@ -859,7 +859,7 @@ func (ncp *NginxConfigParser) prepareHTTPClient(ctx context.Context) (*http.Clie
859
859
}
860
860
861
861
// Populate the CA cert location based ondirectory allowance.
862
- func (ncp * NginxConfigParser ) getCACertLocation (ctx context.Context ) string {
862
+ func (ncp * NginxConfigParser ) selfSignedCACertLocation (ctx context.Context ) string {
863
863
caCertLocation := ncp .agentConfig .DataPlaneConfig .Nginx .APITls .Ca
864
864
865
865
if caCertLocation != "" && ! ncp .agentConfig .IsDirectoryAllowed (caCertLocation ) {
You can’t perform that action at this time.
0 commit comments