cloudapi: fix issue in koji api test forgotten in #2758
The `TestKojiJobTypeValidation` unit test used the `OSBuildJob` and Koji Target fields in the wrong way, however without any impact on the testing itself. The reason is that no actual images were built as part of the test nor the created jobs were ever picked up by a worker. This change was forgotten in PR#2758. [1] https://github.com/osbuild/osbuild-composer/pull/2758
This commit is contained in:
parent
6f464949f5
commit
a61b8af261
1 changed files with 3 additions and 3 deletions
|
|
@ -600,10 +600,10 @@ func TestKojiJobTypeValidation(t *testing.T) {
|
|||
Server: "test-server",
|
||||
UploadDirectory: "koji-server-test-dir",
|
||||
})
|
||||
kojiTarget.OsbuildArtifact.ExportFilename = fmt.Sprintf("image-file-%04d", idx)
|
||||
kojiTarget.OsbuildArtifact.ExportFilename = "test.img"
|
||||
kojiTarget.ImageName = fmt.Sprintf("image-file-%04d", idx)
|
||||
buildJob := worker.OSBuildJob{
|
||||
ImageName: fmt.Sprintf("build-job-%04d", idx),
|
||||
Targets: []*target.Target{kojiTarget},
|
||||
Targets: []*target.Target{kojiTarget},
|
||||
// Add an empty manifest as a static job argument to make the test pass.
|
||||
// Becasue of a bug in the API, the test was passing even without
|
||||
// any manifest being attached to the job (static or dynamic).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue