mirror of
https://github.com/containers/podman.git
synced 2025-10-14 17:55:51 +08:00
Merge pull request #26891 from winterqt/push-ozksmwkumrrs
fix(libpod): truncate long hostnames to correct maximum length
This commit is contained in:
@ -788,7 +788,7 @@ var _ = Describe("Verify podman containers.conf usage", func() {
|
||||
})
|
||||
|
||||
startContainer := func(params ...string) string {
|
||||
args := []string{"create"}
|
||||
args := []string{"run", "-d"}
|
||||
for _, param := range params {
|
||||
if param == "--name" {
|
||||
args = append(args, "--replace")
|
||||
@ -888,7 +888,7 @@ var _ = Describe("Verify podman containers.conf usage", func() {
|
||||
name = getContainerConfig(containerID, "{{ .Name }}")
|
||||
// Double check that name actually got set correctly
|
||||
Expect(name).To(Equal(longHostname))
|
||||
// Hostname should be the container name truncated to 253 characters
|
||||
Expect(hostname).To(Equal(name[:253]))
|
||||
// Hostname should be the container name truncated to 64 characters
|
||||
Expect(hostname).To(Equal(name[:64]))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user