Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
638fe8d1
Unverified
Commit
638fe8d1
authored
May 09, 2019
by
Matthew Fisher
Committed by
GitHub
May 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5706 from bacongobbler/fix-5371
fix(pkg/storage/driver): use shallowReleaseEqual()
parents
55e87b68
ae0d4b15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
sql_test.go
pkg/storage/driver/sql_test.go
+8
-6
No files found.
pkg/storage/driver/sql_test.go
View file @
638fe8d1
...
...
@@ -18,7 +18,6 @@ package driver
import
(
"fmt"
"reflect"
"regexp"
"testing"
"time"
...
...
@@ -41,7 +40,10 @@ func TestSQLGet(t *testing.T) {
key
:=
testKey
(
name
,
vers
)
rel
:=
releaseStub
(
name
,
vers
,
namespace
,
rspb
.
Status_DEPLOYED
)
body
,
_
:=
encodeRelease
(
rel
)
body
,
err
:=
encodeRelease
(
rel
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
sqlDriver
,
mock
:=
newTestFixtureSQL
(
t
)
mock
.
...
...
@@ -60,7 +62,7 @@ func TestSQLGet(t *testing.T) {
t
.
Fatalf
(
"Failed to get release: %v"
,
err
)
}
if
!
reflect
.
Deep
Equal
(
rel
,
got
)
{
if
!
shallowRelease
Equal
(
rel
,
got
)
{
t
.
Errorf
(
"Expected release {%q}, got {%q}"
,
rel
,
got
)
}
...
...
@@ -275,7 +277,7 @@ func TestSqlQuery(t *testing.T) {
}
for
_
,
res
:=
range
results
{
if
!
reflect
.
Deep
Equal
(
res
,
deployedRelease
)
{
if
!
shallowRelease
Equal
(
res
,
deployedRelease
)
{
t
.
Errorf
(
"Expected release {%q}, got {%q}"
,
deployedRelease
,
res
)
}
}
...
...
@@ -290,7 +292,7 @@ func TestSqlQuery(t *testing.T) {
}
for
_
,
res
:=
range
results
{
if
!
reflect
.
DeepEqual
(
res
,
deployedRelease
)
&&
!
reflect
.
Deep
Equal
(
res
,
supersededRelease
)
{
if
!
shallowReleaseEqual
(
res
,
deployedRelease
)
&&
!
shallowRelease
Equal
(
res
,
supersededRelease
)
{
t
.
Errorf
(
"Expected release {%q} or {%q}, got {%q}"
,
deployedRelease
,
supersededRelease
,
res
)
}
}
...
...
@@ -334,7 +336,7 @@ func TestSqlDelete(t *testing.T) {
t
.
Fatalf
(
"failed to delete release with key %q: %v"
,
key
,
err
)
}
if
!
reflect
.
Deep
Equal
(
rel
,
deletedRelease
)
{
if
!
shallowRelease
Equal
(
rel
,
deletedRelease
)
{
t
.
Errorf
(
"Expected release {%q}, got {%q}"
,
rel
,
deletedRelease
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment