Skip to content

Commit

Permalink
Aerospike Module: Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
herrBez committed Feb 23, 2024
1 parent 59df82f commit 7f575e7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions metricbeat/module/aerospike/aerospike_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package aerospike

import (
"crypto/tls"
"errors"
"fmt"
"testing"
Expand Down Expand Up @@ -118,8 +117,6 @@ func TestParseClientPolicy(t *testing.T) {
UserPasswordClientPolicy.Password = samplePassword

TLSPolicy := as.NewClientPolicy()
TLSPolicy.TlsConfig = &tls.Config{}

ClusterNamePolicy := as.NewClientPolicy()
ClusterNamePolicy.ClusterName = sampleClusterName

Expand Down Expand Up @@ -167,7 +164,6 @@ func TestParseClientPolicy(t *testing.T) {
Enabled: getBoolPointer(true),
},
},

expectedClientPolicy: TLSPolicy,
expectedErr: nil,
},
Expand All @@ -176,7 +172,7 @@ func TestParseClientPolicy(t *testing.T) {
Config: Config{
ClusterName: getStringPointer(sampleClusterName),
},
expectedClientPolicy: ClusterNamePolicy,
expectedClientPolicy: nil,
expectedErr: nil,
},
}
Expand All @@ -194,7 +190,7 @@ func TestParseClientPolicy(t *testing.T) {
assert.Equal(t, test.expectedClientPolicy.User, result.User, test.Name)
assert.Equal(t, test.expectedClientPolicy.Password, result.Password, test.Name)
if test.Config.TLS.IsEnabled() {
assert.NotNil(t, test.expectedClientPolicy.TlsConfig)
assert.NotNil(t, result.TlsConfig)
}
}
}

0 comments on commit 7f575e7

Please sign in to comment.