summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api/api.go
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2018-10-23 11:54:58 -0700
committerVictor Morales <victor.morales@intel.com>2018-11-13 16:20:57 -0800
commitcc05d4af8f082d8174bde5c43fc45b1acc61339f (patch)
treee5614b80fd1f4762c195eb26f639f7963eb2bb5f /src/k8splugin/api/api.go
parent7d2d48d3d0b35de0acd03c6e8a1261efd736edc3 (diff)
Create UTs to cover DB calls
This change pretends to increase the code coverage creating Unit Tests for the interactions with the Databases. Change-Id: I3b78ebe8ddb131e3c06bcee0065ad5eabeed5677 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
Diffstat (limited to 'src/k8splugin/api/api.go')
-rw-r--r--src/k8splugin/api/api.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/k8splugin/api/api.go b/src/k8splugin/api/api.go
index e90c994e..f05fbb0b 100644
--- a/src/k8splugin/api/api.go
+++ b/src/k8splugin/api/api.go
@@ -47,12 +47,7 @@ func CheckDatabaseConnection() error {
return pkgerrors.Cause(err)
}
- err = db.DBconn.InitializeDatabase()
- if err != nil {
- return pkgerrors.Cause(err)
- }
-
- err = db.DBconn.CheckDatabase()
+ err = db.DBconn.HealthCheck()
if err != nil {
return pkgerrors.Cause(err)
}