Skip to content

Commit 40ca450

Browse files
committed
fix upgrade functions version numbers
1 parent ab385f7 commit 40ca450

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

intelmq/lib/upgrades.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
'v322_url_replacement',
4343
'v322_removed_feeds_and_bots',
4444
'v340_deprecations',
45-
'v341_blueliv_removal',
46-
'v342_new_fields',
45+
'v350_blueliv_removal',
46+
'v350_new_fields',
4747
]
4848

4949

@@ -976,7 +976,7 @@ def v340_deprecations(configuration, harmonization, dry_run, **kwargs):
976976
return message or changed, configuration, harmonization
977977

978978

979-
def v341_blueliv_removal(configuration, harmonization, dry_run, **kwargs):
979+
def v350_blueliv_removal(configuration, harmonization, dry_run, **kwargs):
980980
"""
981981
Remove blueliv collector and parser
982982
"""
@@ -999,7 +999,7 @@ def v341_blueliv_removal(configuration, harmonization, dry_run, **kwargs):
999999
return message, configuration, harmonization
10001000

10011001

1002-
def v342_new_fields(configuration, harmonization, dry_run, **kwargs):
1002+
def v350_new_fields(configuration, harmonization, dry_run, **kwargs):
10031003
"""
10041004
Add new fields to IntelMQ Data Format
10051005
"""
@@ -1057,8 +1057,7 @@ def v342_new_fields(configuration, harmonization, dry_run, **kwargs):
10571057
((3, 3, 0), ()),
10581058
((3, 3, 1), ()),
10591059
((3, 4, 0), (v340_deprecations, )),
1060-
((3, 4, 1), (v341_blueliv_removal, )),
1061-
((3, 4, 2), (v342_new_fields, )),
1060+
((3, 5, 0), (v350_blueliv_removal, v350_new_fields)),
10621061
])
10631062

10641063
ALWAYS = (harmonization,)

intelmq/tests/lib/test_upgrades.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@
616616
"module": "intelmq.bots.collectors.twitter.collector",
617617
},
618618
}
619-
V341_BLUELIV_REMOVAL = {
619+
V350_BLUELIV_REMOVAL = {
620620
"global": {},
621621
"blueliv-collector": {
622622
"module": "intelmq.bots.collectors.blueliv.collector_crimeserver"
@@ -865,16 +865,16 @@ def test_v340_twitter_collector(self):
865865
self.assertIn('twitter-collector', result[0])
866866
self.assertEqual(V340_TWITTER_COLLECTOR_IN, result[1])
867867

868-
def test_v341_blueliv_removal(self):
869-
""" Test v341_blueliv_removal deprecation warning """
870-
result = upgrades.v341_blueliv_removal(V341_BLUELIV_REMOVAL, {}, False)
868+
def test_v350_blueliv_removal(self):
869+
""" Test v350_blueliv_removal deprecation warning """
870+
result = upgrades.v350_blueliv_removal(V350_BLUELIV_REMOVAL, {}, False)
871871
self.assertIn('blueliv-collector', result[0])
872872
self.assertIn('blueliv-parser', result[0])
873-
self.assertEqual(V341_BLUELIV_REMOVAL, result[1])
873+
self.assertEqual(V350_BLUELIV_REMOVAL, result[1])
874874

875-
def test_v342_new_fields(self):
875+
def test_v350_new_fields(self):
876876
""" Test adding new harmonisation fields """
877-
result = upgrades.v342_new_fields({}, {"event": {"old-field": "must stay"}}, False)
877+
result = upgrades.v350_new_fields({}, {"event": {"old-field": "must stay"}}, False)
878878
self.assertTrue(result[0])
879879
self.assertIn("old-field", result[2]["event"])
880880
self.assertIn("product.full_name", result[2]["event"])

0 commit comments

Comments
 (0)