Skip to content

Commit

Permalink
v1: support hostname customization
Browse files Browse the repository at this point in the history
This was an oversight when adding all the customizations.
  • Loading branch information
croissanne authored and achilleas-k committed Jan 30, 2025
1 parent 34cdc67 commit 629d30a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions internal/v1/handler_compose_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -1108,5 +1108,7 @@ func (h *Handlers) buildCustomizations(ctx echo.Context, cr *ComposeRequest, d *
}
}

res.Hostname = cust.Hostname

return res, nil
}
4 changes: 3 additions & 1 deletion internal/v1/handler_post_compose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2519,7 +2519,7 @@ func TestComposeCustomizations(t *testing.T) {
},
passwordsPresentAndRedacted: false,
},
// firewall, services, locale, tz, containers
// firewall, services, locale, tz, containers, hostname
{
imageBuilderRequest: v1.ComposeRequest{
Customizations: &v1.Customizations{
Expand All @@ -2541,6 +2541,7 @@ func TestComposeCustomizations(t *testing.T) {
Source: "container.io/test",
},
},
Hostname: common.ToPtr("test-host"),
},
Distribution: "rhel-8",
ImageRequests: []v1.ImageRequest{
Expand Down Expand Up @@ -2575,6 +2576,7 @@ func TestComposeCustomizations(t *testing.T) {
Source: "container.io/test",
},
},
Hostname: common.ToPtr("test-host"),
},
ImageRequest: &composer.ImageRequest{
Architecture: "x86_64",
Expand Down

0 comments on commit 629d30a

Please sign in to comment.