internal/helm/getter: remove transport reuse test

Since the transport reuse is dependent on the garbage collection, the
result is inconsistent. It fails frequently when running the tests with
the go race detector. Remove the test.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
This commit is contained in:
Sunny 2022-03-16 23:07:25 +05:30 committed by Paulo Gomes
parent d38086bd72
commit d72a189e88
No known key found for this signature in database
GPG Key ID: 9995233870E99BEE
1 changed files with 5 additions and 10 deletions

View File

@ -34,23 +34,18 @@ func Test_TransportReuse(t *testing.T) {
t.Errorf("error releasing transport t2: %v", err)
}
t3 := NewOrIdle(nil)
if t2 != t3 {
t.Errorf("transported not reused")
}
t4 := NewOrIdle(&tls.Config{
t3 := NewOrIdle(&tls.Config{
ServerName: "testing",
})
if t4.TLSClientConfig == nil || t4.TLSClientConfig.ServerName != "testing" {
if t3.TLSClientConfig == nil || t3.TLSClientConfig.ServerName != "testing" {
t.Errorf("TLSClientConfig not properly configured")
}
err = Release(t4)
err = Release(t3)
if err != nil {
t.Errorf("error releasing transport t4: %v", err)
t.Errorf("error releasing transport t3: %v", err)
}
if t4.TLSClientConfig != nil {
if t3.TLSClientConfig != nil {
t.Errorf("TLSClientConfig not cleared after release")
}