Merge pull request #21000 from rhatdan/machine

Strip key/values of external quotes
This commit is contained in:
openshift-merge-bot[bot]
2024-02-02 00:59:03 +00:00
committed by GitHub
5 changed files with 11 additions and 4 deletions

View File

@ -622,7 +622,7 @@ func (f *UnitFile) Lookup(groupName string, key string) (string, bool) {
return "", false return "", false
} }
return strings.TrimRightFunc(v, unicode.IsSpace), true return strings.Trim(strings.TrimRightFunc(v, unicode.IsSpace), "\""), true
} }
// Lookup the last instance of a key and convert the value to a bool // Lookup the last instance of a key and convert the value to a bool

View File

@ -1,6 +1,6 @@
[Container] [Container]
Image=localhost/imagename Image=localhost/imagename
## assert-podman-args "--health-cmd" "\"hello world\"" ## assert-podman-args "--health-cmd" "hello world"
HealthCmd="hello world" HealthCmd="hello world"
## assert-podman-args "--health-interval" "1m" ## assert-podman-args "--health-interval" "1m"
HealthInterval=1m HealthInterval=1m

View File

@ -1,4 +1,4 @@
[Container] [Container]
Image=localhost/imagename Image=localhost/imagename
## assert-podman-args "--hostname" "\"quadlet-host\"" ## assert-podman-args "--hostname" "quadlet-host"
HostName="quadlet-host" HostName=quadlet-host

View File

@ -0,0 +1,6 @@
## assert-podman-final-args localhost/imagename
## assert-podman-args --name=RemoveQuotes\"Name
[Container]
Image="localhost/imagename"
ContainerName="RemoveQuotes"Name"

View File

@ -792,6 +792,7 @@ BOGUS=foo
Entry("ports.container", "ports.container", 0, ""), Entry("ports.container", "ports.container", 0, ""),
Entry("ports_ipv6.container", "ports_ipv6.container", 0, ""), Entry("ports_ipv6.container", "ports_ipv6.container", 0, ""),
Entry("pull.container", "pull.container", 0, ""), Entry("pull.container", "pull.container", 0, ""),
Entry("quotes.container", "quotes.container", 0, ""),
Entry("readonly.container", "readonly.container", 0, ""), Entry("readonly.container", "readonly.container", 0, ""),
Entry("readonly-tmpfs.container", "readonly-tmpfs.container", 0, ""), Entry("readonly-tmpfs.container", "readonly-tmpfs.container", 0, ""),
Entry("readonly-notmpfs.container", "readonly-notmpfs.container", 0, ""), Entry("readonly-notmpfs.container", "readonly-notmpfs.container", 0, ""),