diff --git a/SOURCES/0001-tests-Update-tests-for-osbuild-composer-changes.patch b/SOURCES/0001-tests-Update-tests-for-osbuild-composer-changes.patch new file mode 100644 index 0000000..d0d61eb --- /dev/null +++ b/SOURCES/0001-tests-Update-tests-for-osbuild-composer-changes.patch @@ -0,0 +1,47 @@ +From b1d63edcd830a5a23eaa838f536769681db24acb Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Tue, 14 Jun 2022 13:43:45 -0700 +Subject: [PATCH] tests: Update tests for osbuild-composer changes + +Cancel when the build is in the wrong state now returns a proper error, +and ostree composes now accept the refid, parent, and the url without +returning an error. +--- + weldr/compose_test.go | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/weldr/compose_test.go b/weldr/compose_test.go +index f937510..fb2fa42 100644 +--- a/weldr/compose_test.go ++++ b/weldr/compose_test.go +@@ -97,14 +97,12 @@ func TestStartOSTreeComposeUrl(t *testing.T) { + assert.Greater(t, len(id), 0) + } + +-func TestStartOSTreeComposeUrlError(t *testing.T) { +- // Sending both the parent url and the parent id should return an error ++func TestStartOSTreeUrlParentError(t *testing.T) { ++ // Sending both the parent url and the parent id is now allowed + id, r, err := testState.client.StartOSTreeComposeTest("cli-test-bp-1", "qcow2", "refid", "parent", "http://weldr.io", 0, 2) + require.Nil(t, err) +- require.NotNil(t, r) +- assert.False(t, r.Status) +- assert.Equal(t, APIErrorMsg{"OSTreeOptionsError", "Supply at most one of Parent and URL"}, r.Errors[0]) +- assert.Equal(t, len(id), 0) ++ require.Nil(t, r) ++ assert.Greater(t, len(id), 0) + } + + func TestStartOSTreeComposeUpload(t *testing.T) { +@@ -196,7 +194,7 @@ func TestCancelFinishedCompose(t *testing.T) { + require.NotNil(t, status) + assert.False(t, status.Status) + require.GreaterOrEqual(t, len(r), 1) +- assert.Equal(t, APIErrorMsg{"InternalServerError", "Internal server error: job does not exist"}, r[0]) ++ assert.Equal(t, APIErrorMsg{"BuildInWrongState", fmt.Sprintf("Build %s is not in WAITING or RUNNING.", id)}, r[0]) + } + + func TestCancelComposeUnknown(t *testing.T) { +-- +2.37.1 + diff --git a/SPECS/weldr-client.spec b/SPECS/weldr-client.spec index 10ed745..ad20674 100644 --- a/SPECS/weldr-client.spec +++ b/SPECS/weldr-client.spec @@ -7,7 +7,7 @@ Name: weldr-client Version: 35.5 -Release: 2%{?dist} +Release: 4%{?dist} # Upstream license specification: Apache-2.0 License: ASL 2.0 Summary: Command line utility to control osbuild-composer @@ -18,6 +18,8 @@ Source1: https://github.com/osbuild/weldr-client/releases/download/v%{version} Source2: https://keys.openpgp.org/vks/v1/by-fingerprint/117E8C168EFE3A7F#/gpg-117E8C168EFE3A7F.key %endif +Patch0001: 0001-tests-Update-tests-for-osbuild-composer-changes.patch + Obsoletes: composer-cli < 35.0 Provides: composer-cli = %{version}-%{release} @@ -126,6 +128,14 @@ composer-cli package. %changelog +* Wed Aug 24 2022 Brian C. Lane - 35.5-4 +- tests: Add osbuild-composer repo file for RHEL 9.1 + Related: rhbz#2118831 + +* Tue Aug 23 2022 Brian C. Lane - 35.5-3 +- tests: Update tests for osbuild composer changes + Resolves: rhbz#2118831 + * Wed Feb 16 2022 Brian C. Lane - 35.5-2 - Switch to tmt tests instead of STI and update repo urls Related: rhbz#2052601