diff --git a/0001-tests-Skip-checking-arch-when-testing-sent-body.patch b/0001-tests-Skip-checking-arch-when-testing-sent-body.patch new file mode 100644 index 0000000..affb1aa --- /dev/null +++ b/0001-tests-Skip-checking-arch-when-testing-sent-body.patch @@ -0,0 +1,48 @@ +From 6815aa4a2a0b2bd376d0f6e072580a9c60086e3e Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Thu, 14 Aug 2025 09:26:25 -0700 +Subject: [PATCH] tests: Skip checking arch when testing sent body + +The host architecture is included in the body of the request, skip +checking for the specific arch in order to keep the tests architecture +independent. + +Related: RHEL-60137 +--- + cmd/composer-cli/projects/info_test.go | 4 +++- + cmd/composer-cli/projects/list_test.go | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/cmd/composer-cli/projects/info_test.go b/cmd/composer-cli/projects/info_test.go +index 3f9a85f..dd2a78c 100644 +--- a/cmd/composer-cli/projects/info_test.go ++++ b/cmd/composer-cli/projects/info_test.go +@@ -457,7 +457,9 @@ func TestCmdProjectsInfoCloud(t *testing.T) { + sentBody, err := io.ReadAll(mcc.Req.Body) + assert.Nil(t, mcc.Req.Body.Close()) + require.Nil(t, err) +- assert.Contains(t, string(sentBody), `{"distribution":"homer","architecture":"x86_64","packages":["tmux"]}`) ++ // NOTE: sentBody also contains arch specific architecture, skip checking that. ++ assert.Contains(t, string(sentBody), `"distribution":"homer"`) ++ assert.Contains(t, string(sentBody), `"packages":["tmux"]`) + assert.Equal(t, "application/json", mcc.Req.Header.Get("Content-Type")) + assert.Equal(t, "/api/image-builder-composer/v2/search/packages", mcc.Req.URL.Path) + } +diff --git a/cmd/composer-cli/projects/list_test.go b/cmd/composer-cli/projects/list_test.go +index b809224..386b793 100644 +--- a/cmd/composer-cli/projects/list_test.go ++++ b/cmd/composer-cli/projects/list_test.go +@@ -363,7 +363,9 @@ func TestCmdProjectsListCloud(t *testing.T) { + sentBody, err := io.ReadAll(mcc.Req.Body) + assert.Nil(t, mcc.Req.Body.Close()) + require.Nil(t, err) +- assert.Contains(t, string(sentBody), `{"distribution":"homer","architecture":"x86_64","packages":["*"]}`) ++ // NOTE: sentBody also contains arch specific architecture, skip checking that. ++ assert.Contains(t, string(sentBody), `"distribution":"homer"`) ++ assert.Contains(t, string(sentBody), `"packages":["*"]`) + assert.Equal(t, "application/json", mcc.Req.Header.Get("Content-Type")) + assert.Equal(t, "/api/image-builder-composer/v2/search/packages", mcc.Req.URL.Path) + } +-- +2.50.1 + diff --git a/weldr-client.spec b/weldr-client.spec index 937e157..82def08 100644 --- a/weldr-client.spec +++ b/weldr-client.spec @@ -130,7 +130,7 @@ composer-cli package. %changelog -* Fri Oct 31 2025 Brian C. Lane - 36.1-1 +* Wed Oct 15 2025 Brian C. Lane - 36.1-1 - New release: 36.1 (bcl) - build(deps): bump actions/setup-go from 5 to 6 (49699333+dependabot[bot]) - build(deps): bump github.com/spf13/cobra from 1.9.1 to 1.10.1 (49699333+dependabot[bot]) @@ -138,4 +138,4 @@ composer-cli package. - test: qcow2 renamed to server-qcow2 (bcl) - build(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.1 (49699333+dependabot[bot]) - build(deps): bump actions/checkout from 4 to 5 (49699333+dependabot[bot]) -- tests: Use current host arch in info and list tests (bcl) +- tests: Use current host arch in info and list tests (bcl) \ No newline at end of file