Compare commits

..

1 commit

Author SHA1 Message Date
Brian C. Lane
b4e85e30aa - 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])
- test: iot-qcow2-image does not support packages (bcl)
- 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)
2025-10-31 09:14:01 -07:00
2 changed files with 2 additions and 50 deletions

View file

@ -1,48 +0,0 @@
From 6815aa4a2a0b2bd376d0f6e072580a9c60086e3e Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
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

View file

@ -130,7 +130,7 @@ composer-cli package.
%changelog
* Wed Oct 15 2025 Brian C. Lane <bcl@redhat.com> - 36.1-1
* Fri Oct 31 2025 Brian C. Lane <bcl@redhat.com> - 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)