Skip to content

Commit

Permalink
Fix: Add feed version to tests to avoid momentjs warnings
Browse files Browse the repository at this point in the history
The feed version is parsed as date and if it is missing momentjs will
complain. Therefore add the version to all feed sync tests to avoid
warnings when running them.
  • Loading branch information
bjoernricks committed Feb 20, 2025
1 parent 99aa85d commit eeac3c8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
29 changes: 25 additions & 4 deletions src/gmp/commands/__tests__/feedstatus.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,18 @@ describe('FeedStatusCommand tests', () => {
get_feeds: {
get_feeds_response: {
feed: [
{type: 'NVT', currently_syncing: true, sync_not_available: false},
{type: 'SCAP', currently_syncing: false, sync_not_available: false},
{
type: 'NVT',
currently_syncing: true,
sync_not_available: false,
version: 202502170647,
},
{
type: 'SCAP',
currently_syncing: false,
sync_not_available: false,
version: 202502170647,
},
],
},
},
Expand All @@ -74,6 +84,7 @@ describe('FeedStatusCommand tests', () => {
type: 'OTHER',
currently_syncing: false,
sync_not_available: false,
version: 202502170647,
},
],
},
Expand All @@ -92,8 +103,18 @@ describe('FeedStatusCommand tests', () => {
get_feeds: {
get_feeds_response: {
feed: [
{type: 'NVT', currently_syncing: false, sync_not_available: false},
{type: 'SCAP', currently_syncing: false, sync_not_available: false},
{
type: 'NVT',
currently_syncing: false,
sync_not_available: false,
version: 202502170647,
},
{
type: 'SCAP',
currently_syncing: false,
sync_not_available: false,
version: 202502170647,
},
],
},
},
Expand Down
14 changes: 12 additions & 2 deletions src/gmp/commands/__tests__/tasks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,18 @@ describe('TaskCommand tests', () => {
get_feeds: {
get_feeds_response: {
feed: [
{type: 'NVT', currently_syncing: true, sync_not_available: false},
{type: 'SCAP', currently_syncing: false, sync_not_available: false},
{
type: 'NVT',
currently_syncing: true,
sync_not_available: false,
version: 202502170647,
},
{
type: 'SCAP',
currently_syncing: false,
sync_not_available: false,
version: 202502170647,
},
],
},
},
Expand Down

0 comments on commit eeac3c8

Please sign in to comment.