Skip to content

Commit

Permalink
Fix to_package_id type error
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Feb 5, 2025
1 parent 0e6b693 commit dcef209
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion assets/js/lib/test-utils/factories/upgradablePackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const upgradablePackageFactory = Factory.define(({ sequence }) => ({
name: `${faker.word.noun()}${sequence}`,
patches: patchForPackageFactory.buildList(2),
to_epoch: faker.date.anytime(),
to_package_id: faker.number.int({ min: 2000, max: 5000 }),
to_package_id: `${faker.number.int({ min: 2000, max: 5000 })}`,
to_release: releaseVersionFactory(),
to_version: faker.system.semver(),
}));
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('exports the packages in CSV format', () => {
upgradablePackageFactory.build({
name: 'elixir',
arch: 'x86_64',
to_package_id: 92348112636,
to_package_id: '92348112636',
to_epoch: '0',
from_epoch: '0',
from_release: '3',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/state/sagas/hosts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ describe('Hosts sagas', () => {
from_release: '150400.7.25.1',
to_epoch: ' ',
arch: 'x86_64',
to_package_id: 37454,
to_package_id: '37454',
from_version: '1.1.1l',
to_version: '1.1.1l',
from_arch: 'x86_64',
Expand Down
5 changes: 1 addition & 4 deletions assets/js/state/sagas/softwareUpdates.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ export function* fetchUpgradablePackagesPatches({ payload: { hostID } }) {
yield put(
setPatchesForPackages({
hostID,
patches: patches.map((patch) => ({
...patch,
package_id: Number(patch.package_id),
})),
patches,
})
);
yield put(setSettingsConfigured());
Expand Down
2 changes: 1 addition & 1 deletion assets/js/state/sagas/softwareUpdates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('Software Updates saga', () => {
from_release: '150400.7.25.1',
to_epoch: ' ',
arch: 'x86_64',
to_package_id: 37454,
to_package_id: '37454',
from_version: '1.1.1l',
to_version: '1.1.1l',
from_arch: 'x86_64',
Expand Down
6 changes: 3 additions & 3 deletions assets/js/state/selectors/softwareUpdates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('Software Updates selector', () => {
from_release: '150400.6.3.1',
to_epoch: ' ',
arch: 'x86_64',
to_package_id: 38289,
to_package_id: '38289',
from_version: '5.15.2+kde294',
to_version: '5.15.2+kde294',
from_arch: 'x86_64',
Expand All @@ -74,7 +74,7 @@ describe('Software Updates selector', () => {
from_release: '150300.10.40.1',
to_epoch: ' ',
arch: 'x86_64',
to_package_id: 36262,
to_package_id: '36262',
from_version: '3.6.15',
to_version: '3.6.15',
from_arch: 'x86_64',
Expand All @@ -87,7 +87,7 @@ describe('Software Updates selector', () => {
from_release: '150400.6.3.1',
to_epoch: ' ',
arch: 'x86_64',
to_package_id: 38391,
to_package_id: '38391',
from_version: '5.15.2+kde294',
to_version: '5.15.2+kde294',
from_arch: 'x86_64',
Expand Down
8 changes: 4 additions & 4 deletions assets/js/state/softwareUpdates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('SoftwareUpdates reducer', () => {
from_release: '150400.3.208.1',
to_epoch: ' ',
arch: 'x86_64',
to_package_id: 39942,
to_package_id: '39942',
from_version: '3.1.0',
to_version: '3.1.2',
from_arch: 'x86_64',
Expand Down Expand Up @@ -93,7 +93,7 @@ describe('SoftwareUpdates reducer', () => {
from_release: '150300.3.15.4',
to_epoch: ' ',
arch: 'x86_64',
to_package_id: 39543,
to_package_id: '39543',
from_version: '8.4p1',
to_version: '8.4p1',
from_arch: 'x86_64',
Expand Down Expand Up @@ -208,7 +208,7 @@ describe('SoftwareUpdates reducer', () => {
from_release: '150400.3.208.1',
to_epoch: ' ',
arch: 'x86_64',
to_package_id: 39942,
to_package_id: '39942',
from_version: '3.1.0',
to_version: '3.1.2',
from_arch: 'x86_64',
Expand Down Expand Up @@ -273,7 +273,7 @@ describe('SoftwareUpdates reducer', () => {
from_release: '150400.3.208.1',
to_epoch: ' ',
arch: 'x86_64',
to_package_id: 39942,
to_package_id: '39942',
from_version: '3.1.0',
to_version: '3.1.2',
from_arch: 'x86_64',
Expand Down

0 comments on commit dcef209

Please sign in to comment.