Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
goSDN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
goSDN
Commits
3b9c5b4b
Commit
3b9c5b4b
authored
2 years ago
by
Fabian Seidl
Browse files
Options
Downloads
Patches
Plain Diff
minor additional code cleanup
parent
857e6cb7
No related branches found
No related tags found
1 merge request
!369
Resolve "Delete the store files after the unit testing"
Pipeline
#111275
passed
2 years ago
Stage: build
Stage: test
Stage: analyze
Stage: integration-test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
controller/nucleus/sbiFilesystemStore_test.go
+9
-8
9 additions, 8 deletions
controller/nucleus/sbiFilesystemStore_test.go
with
9 additions
and
8 deletions
controller/nucleus/sbiFilesystemStore_test.go
+
9
−
8
View file @
3b9c5b4b
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment