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
70cd32c4
Commit
70cd32c4
authored
Jul 11, 2019
by
Oleg Sidorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed failing tests for helm installer
Signed-off-by:
Oleg Sidorov
<
oleg.sidorov@booking.com
>
parent
9014bd9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
install_test.go
cmd/helm/installer/install_test.go
+25
-1
No files found.
cmd/helm/installer/install_test.go
View file @
70cd32c4
...
@@ -17,6 +17,7 @@ limitations under the License.
...
@@ -17,6 +17,7 @@ limitations under the License.
package
installer
// import "k8s.io/helm/cmd/helm/installer"
package
installer
// import "k8s.io/helm/cmd/helm/installer"
import
(
import
(
"encoding/json"
"os"
"os"
"path/filepath"
"path/filepath"
"reflect"
"reflect"
...
@@ -716,9 +717,32 @@ func TestDeployment_WithSetValues(t *testing.T) {
...
@@ -716,9 +717,32 @@ func TestDeployment_WithSetValues(t *testing.T) {
// convert our expected value to match the result type for comparison
// convert our expected value to match the result type for comparison
ev
:=
tt
.
expect
ev
:=
tt
.
expect
intType
:=
reflect
.
TypeOf
(
int64
(
0
))
floatType
:=
reflect
.
TypeOf
(
float64
(
0
))
switch
pvt
:=
pv
.
(
type
)
{
switch
pvt
:=
pv
.
(
type
)
{
case
json
.
Number
:
evv
:=
reflect
.
ValueOf
(
ev
)
evv
=
reflect
.
Indirect
(
evv
)
switch
ev
.
(
type
)
{
case
float32
,
float64
:
evv
=
evv
.
Convert
(
floatType
)
if
fpv
,
err
:=
pv
.
(
json
.
Number
)
.
Float64
();
err
!=
nil
{
t
.
Errorf
(
"Failed to convert json number to float: %s"
,
err
)
}
else
if
fpv
!=
evv
.
Float
()
{
t
.
Errorf
(
"%s: expected float value %q, got %f"
,
tt
.
name
,
tt
.
expect
,
fpv
)
}
case
byte
,
int
,
int32
,
int64
:
evv
=
evv
.
Convert
(
intType
)
if
ipv
,
err
:=
pv
.
(
json
.
Number
)
.
Int64
();
err
!=
nil
{
t
.
Errorf
(
"Failed to convert json number to int: %s"
,
err
)
}
else
if
ipv
!=
evv
.
Int
()
{
t
.
Errorf
(
"%s: expected int value %q, got %d"
,
tt
.
name
,
tt
.
expect
,
ipv
)
}
default
:
t
.
Errorf
(
"Unknown primitive type: %s"
,
reflect
.
TypeOf
(
ev
))
}
case
float64
:
case
float64
:
floatType
:=
reflect
.
TypeOf
(
float64
(
0
))
v
:=
reflect
.
ValueOf
(
ev
)
v
:=
reflect
.
ValueOf
(
ev
)
v
=
reflect
.
Indirect
(
v
)
v
=
reflect
.
Indirect
(
v
)
if
!
v
.
Type
()
.
ConvertibleTo
(
floatType
)
{
if
!
v
.
Type
()
.
ConvertibleTo
(
floatType
)
{
...
...
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