Skip to content

Commit

Permalink
fix: fix empty space formatting issue in the rsync job helm template (#…
Browse files Browse the repository at this point in the history
…250)

* fix: fix empty space formatting issue in the rsync job helm template

Signed-off-by: Alex Romanenko <[email protected]

* Update integration/integration_test.go

Co-authored-by: Utku Özdemir <[email protected]>

---------

Signed-off-by: Alex Romanenko <[email protected]
Co-authored-by: Utku Özdemir <[email protected]>
  • Loading branch information
alex-vmw and utkuozdemir authored Sep 29, 2023
1 parent 4051318 commit 6073480
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion helm/pv-migrate/templates/rsync/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
rc=1
retries={{ .Values.rsync.maxRetries }}
period={{ .Values.rsync.retryPeriodSeconds }}
{{- if .Values.rsync.fixPrivateKeyPerms -}}
{{ if .Values.rsync.fixPrivateKeyPerms -}}
chmod 400 {{ .Values.rsync.privateKeyMountPath }}
{{- end }}
until [ "$n" -ge "$retries" ]
Expand Down
4 changes: 3 additions & 1 deletion integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ const (
migrateCmdlineWithNetpols = migrateCmdline +
"--helm-set rsync.networkPolicy.enabled=true " +
"--helm-set sshd.networkPolicy.enabled=true"
migrateCmdlineWithNetpolsAndRsyncFixPrivateKeyPerms = migrateCmdlineWithNetpols +
" --helm-set rsync.fixPrivateKeyPerms=true"
)

var (
Expand Down Expand Up @@ -177,7 +179,7 @@ func TestSameNSLbSvc(t *testing.T) {
_, err := execInPod(ctx, mainClusterCli, ns1, "dest", generateExtraDataShellCommand)
assert.NoError(t, err)

cmd := fmt.Sprintf("%s -s lbsvc -i -n %s -N %s --lbsvc-timeout 5m source dest", migrateCmdlineWithNetpols, ns1, ns1)
cmd := fmt.Sprintf("%s -s lbsvc -i -n %s -N %s --lbsvc-timeout 5m source dest", migrateCmdlineWithNetpolsAndRsyncFixPrivateKeyPerms, ns1, ns1)
assert.NoError(t, runCliApp(ctx, cmd))

stdout, err := execInPod(ctx, mainClusterCli, ns1, "dest", printDataUIDGIDContentShellCommand)
Expand Down

0 comments on commit 6073480

Please sign in to comment.