compose: fix deep-copying of ImageBuild

I wanted to create a unit test for this method but then I decided not to.
The reason is that if we add another field to ImageBuild but fail to
modify the test it won't catch the bug. I think higher level testing is
needed to cover this function.
This commit is contained in:
Ondřej Budai 2020-02-17 13:15:47 +01:00 committed by msehnout
parent 94929fdafb
commit 345cd6a746

View file

@ -47,6 +47,7 @@ func (ib *ImageBuild) DeepCopy() ImageBuild {
}
// Create new image build struct
return ImageBuild{
Id: ib.Id,
Distro: ib.Distro,
QueueStatus: ib.QueueStatus,
ImageType: ib.ImageType,
@ -55,6 +56,7 @@ func (ib *ImageBuild) DeepCopy() ImageBuild {
JobCreated: ib.JobCreated,
JobStarted: ib.JobStarted,
JobFinished: ib.JobFinished,
Size: ib.Size,
}
}