cloudapi: remove a confusing test
This test tested two things: 1) Invalid route - this is already covered by TestUnknownRoute 2) Invalid UUID in the compose status route - this is now covered by TestComposeStatusInvalidUUID Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
3e25f5ef76
commit
058edd3d76
2 changed files with 18 additions and 31 deletions
|
|
@ -8,9 +8,10 @@ import (
|
|||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/osbuild/osbuild-composer/pkg/jobqueue"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/osbuild/osbuild-composer/pkg/jobqueue"
|
||||
|
||||
v2 "github.com/osbuild/osbuild-composer/internal/cloudapi/v2"
|
||||
"github.com/osbuild/osbuild-composer/internal/distro/test_distro"
|
||||
"github.com/osbuild/osbuild-composer/internal/jobqueue/fsjobqueue"
|
||||
|
|
@ -718,6 +719,22 @@ func TestComposeStatusFailure(t *testing.T) {
|
|||
}`, jobId, jobId))
|
||||
}
|
||||
|
||||
func TestComposeStatusInvalidUUID(t *testing.T) {
|
||||
srv, _, _, cancel := newV2Server(t, t.TempDir(), []string{""}, false)
|
||||
defer cancel()
|
||||
|
||||
test.TestRoute(t, srv.Handler("/api/image-builder-composer/v2"), false, "GET", "/api/image-builder-composer/v2/composes/abcdef", ``, http.StatusBadRequest, `
|
||||
{
|
||||
"code": "IMAGE-BUILDER-COMPOSER-14",
|
||||
"details": "",
|
||||
"href": "/api/image-builder-composer/v2/errors/14",
|
||||
"id": "14",
|
||||
"kind": "Error",
|
||||
"reason": "Invalid format for compose id"
|
||||
}
|
||||
`, "operation_id")
|
||||
}
|
||||
|
||||
func TestComposeJobError(t *testing.T) {
|
||||
srv, wrksrv, _, cancel := newV2Server(t, t.TempDir(), []string{""}, false)
|
||||
defer cancel()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue