osbuild-tests: add compose cancel test
This commit is contained in:
parent
aa0c037bb2
commit
40b65144d1
1 changed files with 10 additions and 6 deletions
|
|
@ -14,11 +14,11 @@ import (
|
|||
"github.com/BurntSushi/toml"
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||
"github.com/osbuild/osbuild-composer/internal/weldr"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
@ -78,14 +78,18 @@ func TestComposeCommands(t *testing.T) {
|
|||
require.NoError(t, err, "'%s-disk.qcow2' not found", uuid.String())
|
||||
defer os.Remove(uuid.String() + "-disk.qcow2")
|
||||
|
||||
// workers ask the composer every 15 seconds if a compose was canceled.
|
||||
// Use 20 seconds here to be sure this is hit.
|
||||
uuid = startCompose(t, "empty", "tar")
|
||||
defer deleteCompose(t, uuid)
|
||||
runComposer(t, "compose", "cancel", uuid.String())
|
||||
time.Sleep(20 * time.Second)
|
||||
status := waitForCompose(t, uuid)
|
||||
assert.Equal(t, "FAILED", status)
|
||||
|
||||
// Check that reusing the cache works ok
|
||||
uuid = buildCompose(t, "empty", "qcow2")
|
||||
defer deleteCompose(t, uuid)
|
||||
|
||||
// https://github.com/osbuild/osbuild-composer/pull/180
|
||||
// uuid = startCompose(t, "empty", "tar")
|
||||
// time.Sleep(time.Second)
|
||||
// runComposer(t, "compose", "cancel", uuid.String())
|
||||
}
|
||||
|
||||
func TestBlueprintCommands(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue