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:
parent
94929fdafb
commit
345cd6a746
1 changed files with 2 additions and 0 deletions
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue