Skip to content
Snippets Groups Projects
Commit 3b9c5b4b authored by Fabian Seidl's avatar Fabian Seidl
Browse files

minor additional code cleanup

parent 857e6cb7
No related branches found
No related tags found
1 merge request!369Resolve "Delete the store files after the unit testing"
Pipeline #111275 passed
...@@ -9,9 +9,13 @@ import ( ...@@ -9,9 +9,13 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
) )
func ensureStoreFilesForTestsAreRemoved() {
ensureStoreFileForTestsIsRemoved(store.SbiFilenameSuffix)
ensureStoreFileForTestsIsRemoved(store.DeviceFilenameSuffix)
}
func TestAddSbi(t *testing.T) { func TestAddSbi(t *testing.T) {
defer ensureStoreFileForTestsIsRemoved(store.SbiFilenameSuffix) defer ensureStoreFilesForTestsAreRemoved()
defer ensureStoreFileForTestsIsRemoved(store.DeviceFilenameSuffix)
pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad") pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad")
sbiStore := NewSbiStore(pndID) sbiStore := NewSbiStore(pndID)
...@@ -27,8 +31,7 @@ func TestAddSbi(t *testing.T) { ...@@ -27,8 +31,7 @@ func TestAddSbi(t *testing.T) {
} }
func TestGetAllSbis(t *testing.T) { func TestGetAllSbis(t *testing.T) {
defer ensureStoreFileForTestsIsRemoved(store.SbiFilenameSuffix) defer ensureStoreFilesForTestsAreRemoved()
defer ensureStoreFileForTestsIsRemoved(store.DeviceFilenameSuffix)
pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad") pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad")
sbiStore := NewSbiStore(pndID) sbiStore := NewSbiStore(pndID)
...@@ -66,8 +69,7 @@ func TestGetAllSbis(t *testing.T) { ...@@ -66,8 +69,7 @@ func TestGetAllSbis(t *testing.T) {
} }
func TestGetSbi(t *testing.T) { func TestGetSbi(t *testing.T) {
defer ensureStoreFileForTestsIsRemoved(store.SbiFilenameSuffix) defer ensureStoreFilesForTestsAreRemoved()
defer ensureStoreFileForTestsIsRemoved(store.DeviceFilenameSuffix)
pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad") pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad")
...@@ -99,8 +101,7 @@ func TestGetSbi(t *testing.T) { ...@@ -99,8 +101,7 @@ func TestGetSbi(t *testing.T) {
} }
func TestDeleteAllSbis(t *testing.T) { func TestDeleteAllSbis(t *testing.T) {
defer ensureStoreFileForTestsIsRemoved(store.SbiFilenameSuffix) defer ensureStoreFilesForTestsAreRemoved()
defer ensureStoreFileForTestsIsRemoved(store.DeviceFilenameSuffix)
pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad") pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad")
sbiStore := NewSbiStore(pndID) sbiStore := NewSbiStore(pndID)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment