diff --git a/Makefile b/Makefile index 180fa71..642da28 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ test: mocks .PHONY: coverage coverage: mocks - go test ./... -coverprofile coverage.cov -coverpkg ./... || true + go test ./... -coverprofile coverage.cov -coverpkg ./... grep -v "_mock.go" coverage.cov > coverage_no_mocks.cov && mv coverage_no_mocks.cov coverage.cov grep -v "test/" coverage.cov > coverage_no_mocks.cov && mv coverage_no_mocks.cov coverage.cov go tool cover -func coverage.cov diff --git a/asconfig/generate_test.go b/asconfig/generate_test.go index cd9f40b..7ea6295 100644 --- a/asconfig/generate_test.go +++ b/asconfig/generate_test.go @@ -586,8 +586,8 @@ var namespaceTC = GenerateTC{ "storage-engine.direct-files": false, "storage-engine.disable-odsync": false, "storage-engine.enable-benchmarks-storage": false, - "storage-engine.encryption-key-file": "null", - "storage-engine.encryption-old-key-file": "null", + "storage-engine.encryption-key-file": "", + "storage-engine.encryption-old-key-file": "", "storage-engine.file[0]": "/opt/aerospike/data/bar.dat", "storage-engine.file[0].shadow": "/opt/aerospike/data/bar-shadow.dat", "storage-engine.file[1]": "/opt/aerospike/data/foo.dat", @@ -899,7 +899,7 @@ var networkTC = GenerateTC{ "fabric.port": 3001, "fabric.recv-rearm-threshold": 1024, "fabric.send-threads": 8, - "fabric.tls-name": "null", + "fabric.tls-name": "", "fabric.tls-port": 0, "heartbeat.connect-timeout-ms": 500, "heartbeat.interval": 150, @@ -922,22 +922,22 @@ var networkTC = GenerateTC{ "service.tls-authenticate-client": false, "service.tls-name": "aerospike-a-2.test-runner", "service.tls-port": 4333, - "tls[0].ca-file": "null", - "tls[0].ca-path": "null", - "tls[0].cert-blacklist": "null", + "tls[0].ca-file": "", + "tls[0].ca-path": "", + "tls[0].cert-blacklist": "", "tls[0].cert-file": "/data/certs/file0.pem", - "tls[0].cipher-suite": "null", + "tls[0].cipher-suite": "", "tls[0].key-file": "/data/certs/key0.pem", - "tls[0].key-file-password": "null", + "tls[0].key-file-password": "", "tls[0].name": "aerospike-a-0", "tls[0].protocols": "TLSv1.2", - "tls[1].ca-file": "null", - "tls[1].ca-path": "null", - "tls[1].cert-blacklist": "null", + "tls[1].ca-file": "", + "tls[1].ca-path": "", + "tls[1].cert-blacklist": "", "tls[1].cert-file": "/data/certs/file1.pem", - "tls[1].cipher-suite": "null", + "tls[1].cipher-suite": "", "tls[1].key-file": "/data/certs/key1.pem", - "tls[1].key-file-password": "null", + "tls[1].key-file-password": "", "tls[1].name": "aerospike-a-1", "tls[1].protocols": "TLSv1.2", }, @@ -1173,17 +1173,17 @@ var serviceTC = GenerateTC{ "migrate-threads": 1, "min-cluster-size": 1, "node-id": "BB9050011AC4202", - "node-id-interface": "null", + "node-id-interface": "", "os-group-perms": false, - "pidfile": "null", + "pidfile": "", "proto-fd-idle-ms": 0, "proto-fd-max": 15000, "query-max-done": 100, "query-threads-limit": 128, "run-as-daemon": true, "salt-allocations": false, - "secrets-address-port": "null", - "secrets-tls-context": "null", + "secrets-address-port": "", + "secrets-tls-context": "", "service-threads": 8, "sindex-builder-threads": 4, "sindex-gc-period": 10, @@ -1191,11 +1191,11 @@ var serviceTC = GenerateTC{ "ticker-interval": 10, "transaction-max-ms": 1000, "transaction-retry-ms": 1002, - "vault-ca": "null", - "vault-namespace": "null", - "vault-path": "null", - "vault-token-file": "null", - "vault-url": "null", + "vault-ca": "", + "vault-namespace": "", + "vault-path": "", + "vault-token-file": "", + "vault-url": "", "work-directory": "/opt/aerospike", }, }, @@ -1263,8 +1263,8 @@ var xdr5TC = GenerateTC{ "dcs": Conf{ "DC1": Conf{ "auth-mode": "none", - "auth-password-file": "null", - "auth-user": "null", + "auth-password-file": "", + "auth-user": "", "connector": false, "max-recoveries-interleaved": 0, "namespaces": Conf{ @@ -1280,7 +1280,7 @@ var xdr5TC = GenerateTC{ "ignored-bins": "", "ignored-sets": "", "max-throughput": 100000, - "remote-namespace": "null", + "remote-namespace": "", "sc-replication-wait-ms": 100, "ship-bin-luts": false, "ship-nsup-deletes": false, @@ -1293,13 +1293,13 @@ var xdr5TC = GenerateTC{ }, "node-address-port": "", "period-ms": 100, - "tls-name": "null", + "tls-name": "", "use-alternate-access-address": false, }, "DC2": Conf{ "auth-mode": "none", - "auth-password-file": "null", - "auth-user": "null", + "auth-password-file": "", + "auth-user": "", "connector": false, "max-recoveries-interleaved": 0, "namespaces": Conf{ @@ -1316,7 +1316,7 @@ var xdr5TC = GenerateTC{ "ignored-bins": "tip,wip", "ignored-sets": "zip,zap", "max-throughput": 100000, - "remote-namespace": "null", + "remote-namespace": "", "sc-replication-wait-ms": 100, "ship-bin-luts": false, "ship-nsup-deletes": false, @@ -1329,7 +1329,7 @@ var xdr5TC = GenerateTC{ }, "node-address-port": "", "period-ms": 100, - "tls-name": "null", + "tls-name": "", "use-alternate-access-address": false, }, }, diff --git a/info/as_parser.go b/info/as_parser.go index c3ca256..2514c2a 100644 --- a/info/as_parser.go +++ b/info/as_parser.go @@ -1148,7 +1148,7 @@ func parseAllXDRConfig(rawMap map[string]string, cmd string) lib.Stats { if dcNamesRaw == "" { dcNames = []string{} - xdrConfigMap[ConfigDCContext] = struct{}{} + xdrConfigMap[ConfigDCContext] = make(lib.Stats) } else { dcNames = strings.Split(dcNamesRaw, ",") xdrConfigMap[ConfigDCContext] = make(lib.Stats, len(dcNames))