Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
006a86d9
Commit
006a86d9
authored
Mar 9, 2021
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Fix refactor of storage KV
parent
ff8774a2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
storage/clientVersion/store.go
+2
-2
2 additions, 2 deletions
storage/clientVersion/store.go
storage/clientVersion/store_test.go
+2
-2
2 additions, 2 deletions
storage/clientVersion/store_test.go
with
4 additions
and
4 deletions
storage/clientVersion/store.go
+
2
−
2
View file @
006a86d9
...
...
@@ -45,7 +45,7 @@ func LoadStore(kv *versioned.KV) (*Store, error) {
kv
:
kv
.
Prefix
(
prefix
),
}
obj
,
err
:=
s
.
kv
.
Get
(
storeKey
)
obj
,
err
:=
s
.
kv
.
Get
(
storeKey
,
storeVersion
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -113,5 +113,5 @@ func (s *Store) save() error {
Data
:
[]
byte
(
s
.
version
.
String
()),
}
return
s
.
kv
.
Set
(
storeKey
,
&
obj
)
return
s
.
kv
.
Set
(
storeKey
,
storeVersion
,
&
obj
)
}
This diff is collapsed.
Click to expand it.
storage/clientVersion/store_test.go
+
2
−
2
View file @
006a86d9
...
...
@@ -71,7 +71,7 @@ func TestLoadStore_ParseVersionError(t *testing.T) {
Data
:
[]
byte
(
"invalid version"
),
}
err
:=
kv
.
Prefix
(
prefix
)
.
Set
(
storeKey
,
&
obj
)
err
:=
kv
.
Prefix
(
prefix
)
.
Set
(
storeKey
,
storeVersion
,
&
obj
)
if
err
!=
nil
{
t
.
Fatalf
(
"Failed to save Store: %+v"
,
err
)
}
...
...
@@ -219,7 +219,7 @@ func TestStore_save(t *testing.T) {
t
.
Errorf
(
"save() returned an error: %+v"
,
err
)
}
obj
,
err
:=
s
.
kv
.
Get
(
storeKey
)
obj
,
err
:=
s
.
kv
.
Get
(
storeKey
,
storeVersion
)
if
err
!=
nil
{
t
.
Errorf
(
"Failed to load clientVersion store: %+v"
,
err
)
}
...
...
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