Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Argo Cd
Commits
89be1c9c
Commit
89be1c9c
authored
5 years ago
by
Alex Collins
Browse files
Options
Download
Email Patches
Plain Diff
fixes tests
parent
d16f29f0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
reposerver/repository/repository_test.go
+5
-4
reposerver/repository/repository_test.go
reposerver/repository/testdata/my-chart/Chart.yaml
+2
-0
reposerver/repository/testdata/my-chart/Chart.yaml
reposerver/repository/testdata/my-chart/templates/my-map.yaml
+4
-0
...server/repository/testdata/my-chart/templates/my-map.yaml
with
11 additions
and
4 deletions
+11
-4
reposerver/repository/repository_test.go
+
5
-
4
View file @
89be1c9c
...
...
@@ -42,6 +42,7 @@ func newServiceWithMocks(root string) (*Service, *gitmocks.Client, *helmmocks.Cl
gitClient
.
On
(
"CommitSHA"
)
.
Return
(
mock
.
Anything
,
nil
)
gitClient
.
On
(
"Root"
)
.
Return
(
root
)
helmClient
.
On
(
"CleanChartCache"
,
mock
.
Anything
,
mock
.
Anything
)
.
Return
(
nil
)
helmClient
.
On
(
"ExtractChart"
,
mock
.
Anything
,
mock
.
Anything
)
.
Return
(
func
(
chart
string
,
version
string
)
string
{
return
path
.
Join
(
root
,
chart
)
},
util
.
NewCloser
(
func
()
error
{
...
...
@@ -240,8 +241,8 @@ func TestGenerateHelmWithValuesDirectoryTraversal(t *testing.T) {
func
TestHelmManifestFromChartRepoWithValueFile
(
t
*
testing
.
T
)
{
service
:=
newService
(
"."
)
source
:=
&
argoappv1
.
ApplicationSource
{
Chart
:
"my-chart"
,
TargetRevision
:
"
>=
1.
0
.0"
,
Chart
:
"
./testdata/
my-chart"
,
TargetRevision
:
"1.
1
.0"
,
Helm
:
&
argoappv1
.
ApplicationSourceHelm
{
ValueFiles
:
[]
string
{
"./my-chart-values.yaml"
},
},
...
...
@@ -264,8 +265,8 @@ func TestHelmManifestFromChartRepoWithValueFile(t *testing.T) {
func
TestHelmManifestFromChartRepoWithValueFileOutsideRepo
(
t
*
testing
.
T
)
{
service
:=
newService
(
"."
)
source
:=
&
argoappv1
.
ApplicationSource
{
Chart
:
"my-chart"
,
TargetRevision
:
"
>=
1.0.0"
,
Chart
:
"
./testdata/
my-chart"
,
TargetRevision
:
"1.0.0"
,
Helm
:
&
argoappv1
.
ApplicationSourceHelm
{
ValueFiles
:
[]
string
{
"../my-chart-2/my-chart-2-values.yaml"
},
},
...
...
This diff is collapsed.
Click to expand it.
reposerver/repository/testdata/my-chart/Chart.yaml
0 → 100644
+
2
-
0
View file @
89be1c9c
name
:
my-chart
version
:
1.1.0
\ No newline at end of file
This diff is collapsed.
Click to expand it.
reposerver/repository/testdata/my-chart/templates/my-map.yaml
0 → 100644
+
4
-
0
View file @
89be1c9c
apiVersion
:
v1
kind
:
ConfigMap
metadata
:
name
:
my-map
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help