Skip to content

Commit

Permalink
fix: Don't request for unknown staleness in tags (#2096)
Browse files Browse the repository at this point in the history
The "unknown" option for host staleness is deprecated.
  • Loading branch information
gkarat authored Nov 15, 2023
1 parent e9bd43c commit 5465e87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Utilities/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export const generateFilter = (
},
].filter(Boolean);

export const allStaleFilters = ['fresh', 'stale', 'stale_warning', 'unknown'];
export const allStaleFilters = ['fresh', 'stale', 'stale_warning'];

export const hybridInventoryTabKeys = {
conventional: {
Expand Down
8 changes: 4 additions & 4 deletions src/api/tagsApi.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('getAllTags', () => {
it('should generate get all tags call', async () => {
// eslint-disable-next-line max-len
const params =
'?order_by=tag&order_how=ASC&per_page=10&page=1&staleness=fresh&staleness=stale&staleness=stale_warning&staleness=unknown';
'?order_by=tag&order_how=ASC&per_page=10&page=1&staleness=fresh&staleness=stale&staleness=stale_warning';
mockedTags
.onGet(`/api/inventory/v1/tags${params}`)
.replyOnce(200, { test: 'test' });
Expand All @@ -19,7 +19,7 @@ describe('getAllTags', () => {
it('should generate get all tags call with search', async () => {
// eslint-disable-next-line max-len
const params =
'?order_by=tag&order_how=ASC&per_page=10&page=1&staleness=fresh&staleness=stale&staleness=stale_warning&staleness=unknown&search=something';
'?order_by=tag&order_how=ASC&per_page=10&page=1&staleness=fresh&staleness=stale&staleness=stale_warning&search=something';
mockedTags
.onGet(`/api/inventory/v1/tags${params}`)
.replyOnce(200, { test: 'test' });
Expand All @@ -31,7 +31,7 @@ describe('getAllTags', () => {
it('should generate get all tags call with perPage', async () => {
// eslint-disable-next-line max-len
const params =
'?order_by=tag&order_how=ASC&per_page=50&page=1&staleness=fresh&staleness=stale&staleness=stale_warning&staleness=unknown';
'?order_by=tag&order_how=ASC&per_page=50&page=1&staleness=fresh&staleness=stale&staleness=stale_warning';
mockedTags
.onGet(`/api/inventory/v1/tags${params}`)
.replyOnce(200, { test: 'test' });
Expand All @@ -44,7 +44,7 @@ describe('getAllTags', () => {
it('should generate get all tags call with page', async () => {
// eslint-disable-next-line max-len
const params =
'?order_by=tag&order_how=ASC&per_page=10&page=20&staleness=fresh&staleness=stale&staleness=stale_warning&staleness=unknown';
'?order_by=tag&order_how=ASC&per_page=10&page=20&staleness=fresh&staleness=stale&staleness=stale_warning';
mockedTags
.onGet(`/api/inventory/v1/tags${params}`)
.replyOnce(200, { test: 'test' });
Expand Down

0 comments on commit 5465e87

Please sign in to comment.