osbuild-worker-executor: job-id in control.json as hostname

This commit adds support to set the hostname to the job-id that
is part of the control.json.
This commit is contained in:
Michael Vogt 2024-06-13 15:42:53 +02:00
parent 2e31ea50aa
commit fc1d1c3b8f
4 changed files with 56 additions and 0 deletions

View file

@ -12,6 +12,14 @@ var (
HandleIncludedSources = handleIncludedSources
)
func MockUnixSethostname(new func([]byte) error) (restore func()) {
saved := unixSethostname
unixSethostname = new
return func() {
unixSethostname = saved
}
}
func MockOsbuildBinary(t *testing.T, new string) (restore func()) {
t.Helper()