summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-09-13 20:26:24 +0200
committerGitHub <noreply@github.com>2022-09-13 20:26:24 +0200
commitad529f31d82796c17c5a3dde5fed20b84d5bd256 (patch)
tree6d6f50a8e9c9d5d9de2b5bb248d3f54b8ee755fe /pkg
parent6e382d9ec2e6eb79a72537544341e496368b6c63 (diff)
parent9d41b95d72ef29870e6c325557c89c2db818a371 (diff)
downloadpodman-ad529f31d82796c17c5a3dde5fed20b84d5bd256.tar.gz
podman-ad529f31d82796c17c5a3dde5fed20b84d5bd256.tar.bz2
podman-ad529f31d82796c17c5a3dde5fed20b84d5bd256.zip
Merge pull request #15673 from Luap99/template
Fix go template parsing with "\n" in it
Diffstat (limited to 'pkg')
-rw-r--r--pkg/machine/e2e/inspect_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/machine/e2e/inspect_test.go b/pkg/machine/e2e/inspect_test.go
index 0ab928205..fac9f7ebe 100644
--- a/pkg/machine/e2e/inspect_test.go
+++ b/pkg/machine/e2e/inspect_test.go
@@ -75,5 +75,13 @@ var _ = Describe("podman machine stop", func() {
Expect(err).To(BeNil())
Expect(inspectSession).To(Exit(0))
Expect(inspectSession.Bytes()).To(ContainSubstring(name))
+
+ // check invalid template returns error
+ inspect = new(inspectMachine)
+ inspect = inspect.withFormat("{{.Abcde}}")
+ inspectSession, err = mb.setName(name).setCmd(inspect).run()
+ Expect(err).To(BeNil())
+ Expect(inspectSession).To(Exit(125))
+ Expect(inspectSession.errorToString()).To(ContainSubstring("can't evaluate field Abcde in type machine.InspectInfo"))
})
})