Skip to content

Commit 4da851e

Browse files
committed
addressing PR coments
1 parent 6c2f5ca commit 4da851e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

internal/collector/nginxossreceiver/internal/scraper/stubstatus/stub_status_scraper_tls_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Reading: 6 Writing: 179 Waiting: 106
7474
defer server.Close()
7575

7676
// 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) {
7878
cfg, ok := config.CreateDefaultConfig().(*config.Config)
7979
require.True(t, ok)
8080

@@ -134,7 +134,7 @@ Reading: 6 Writing: 179 Waiting: 106
134134
})
135135

136136
// 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) {
138138
cfg, ok := config.CreateDefaultConfig().(*config.Config)
139139
require.True(t, ok)
140140

internal/datasource/config/nginx_config_parser.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ func (ncp *NginxConfigParser) urlsForLocationDirectiveAPIDetails(
652652
caCertLocation := ""
653653
// If SSl is enabled, check if CA cert is provided and the location is allowed
654654
if isSSL {
655-
caCertLocation = ncp.getCACertLocation(ctx)
655+
caCertLocation = ncp.selfSignedCACertLocation(ctx)
656656
}
657657
// process from the location block
658658
if current.Directive != locationDirective {
@@ -859,7 +859,7 @@ func (ncp *NginxConfigParser) prepareHTTPClient(ctx context.Context) (*http.Clie
859859
}
860860

861861
// 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 {
863863
caCertLocation := ncp.agentConfig.DataPlaneConfig.Nginx.APITls.Ca
864864

865865
if caCertLocation != "" && !ncp.agentConfig.IsDirectoryAllowed(caCertLocation) {

0 commit comments

Comments
 (0)