@@ -794,11 +794,11 @@ func Test_setProxyEnvs(t *testing.T) {
794
794
msg := "Setting test proxy"
795
795
796
796
// Unset first to ensure clean state
797
- _ = os .Unsetenv ("HTTP_PROXY " )
797
+ _ = os .Unsetenv ("HTTPS_PROXY " )
798
798
799
799
setProxyEnvs (ctx , proxyURL , msg )
800
800
801
- httpProxy := os .Getenv ("HTTP_PROXY " )
801
+ httpProxy := os .Getenv ("HTTPS_PROXY " )
802
802
assert .Equal (t , proxyURL , httpProxy )
803
803
}
804
804
@@ -812,12 +812,12 @@ func Test_setProxyWithBasicAuth(t *testing.T) {
812
812
}
813
813
814
814
// Unset first to ensure clean state
815
- _ = os .Unsetenv ("HTTP_PROXY " )
815
+ _ = os .Unsetenv ("HTTPS_PROXY " )
816
816
817
817
setProxyWithBasicAuth (ctx , proxy , u )
818
818
819
819
proxyURL := u .String ()
820
- httpProxy := os .Getenv ("HTTP_PROXY " )
820
+ httpProxy := os .Getenv ("HTTPS_PROXY " )
821
821
assert .Equal (t , proxyURL , httpProxy )
822
822
823
823
// Test missing username/password
@@ -878,7 +878,7 @@ func TestSetExporterProxyEnvVars(t *testing.T) {
878
878
t .Run (tt .name , func (t * testing.T ) {
879
879
logBuf .Reset ()
880
880
881
- _ = os .Unsetenv ("HTTP_PROXY " )
881
+ _ = os .Unsetenv ("HTTPS_PROXY " )
882
882
883
883
tmpDir := t .TempDir ()
884
884
cfg := types .OTelConfig (t )
@@ -889,7 +889,7 @@ func TestSetExporterProxyEnvVars(t *testing.T) {
889
889
// added this check to prevent the panic error in UT.
890
890
if cfg .Command .Server .Proxy == nil {
891
891
// For the nil proxy case, we expect nothing to happen.
892
- assert .Empty (t , os .Getenv ("HTTP_PROXY " ))
892
+ assert .Empty (t , os .Getenv ("HTTPS_PROXY " ))
893
893
894
894
return
895
895
}
@@ -902,9 +902,9 @@ func TestSetExporterProxyEnvVars(t *testing.T) {
902
902
helpers .ValidateLog (t , tt .expectedLog , logBuf )
903
903
904
904
if tt .setEnv {
905
- assert .NotEmpty (t , os .Getenv ("HTTP_PROXY " ))
905
+ assert .NotEmpty (t , os .Getenv ("HTTPS_PROXY " ))
906
906
} else {
907
- assert .Empty (t , os .Getenv ("HTTP_PROXY " ))
907
+ assert .Empty (t , os .Getenv ("HTTPS_PROXY " ))
908
908
}
909
909
})
910
910
}
0 commit comments