-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore subscriptions without products
- Loading branch information
Showing
7 changed files
with
369 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/test/resources/com/suse/matcher/scenarios/44/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Scenario 44 - Subscriptions without products | ||
============================================ | ||
|
||
This scenario defines a system with a matching subscription. The user has also | ||
two additional subscriptions: | ||
|
||
- a known subscription for a service which is not associated with any product. | ||
This subscription has a part number starting with 051. | ||
- an unknown part number describing a subscription without any associated product | ||
|
||
Result | ||
------ | ||
|
||
The system will get its subscription. The two subscriptions without product will be | ||
both ignored, but for the unknown part number an info message will be reported |
165 changes: 165 additions & 0 deletions
165
src/test/resources/com/suse/matcher/scenarios/44/input.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
{ | ||
"timestamp": "2015-05-01T00:00:00.000+0200", | ||
"pinned_matches": [], | ||
"products": [ | ||
{ | ||
"id": 814, | ||
"name": "SUSE Linux Enterprise Server 11 SP3 x86_64", | ||
"base": true | ||
} | ||
], | ||
"subscriptions": [ | ||
{ | ||
"id": 1, | ||
"part_number": "051-004678", | ||
"name": "SUSE Premium Silver (30 SRs, valid for 12 Months) - EMEA Zone 2", | ||
"quantity": 1, | ||
"start_date": "2014-07-30T00:00:00Z", | ||
"end_date": "2015-07-31T00:00:00Z", | ||
"scc_username": "UC7", | ||
"product_ids": [] | ||
}, | ||
{ | ||
"end_date": "2015-07-31T00:00:00Z", | ||
"id": 2, | ||
"part_number": "051-003964", | ||
"product_ids": [ | ||
669, | ||
670, | ||
673, | ||
674, | ||
677, | ||
679, | ||
681, | ||
683, | ||
684, | ||
686, | ||
687, | ||
688, | ||
690, | ||
691, | ||
694, | ||
695, | ||
696, | ||
697, | ||
698, | ||
700, | ||
703, | ||
704, | ||
706, | ||
707, | ||
708, | ||
709, | ||
712, | ||
713, | ||
717, | ||
718, | ||
719, | ||
721, | ||
723, | ||
724, | ||
725, | ||
726, | ||
727, | ||
729, | ||
730, | ||
733, | ||
735, | ||
737, | ||
742, | ||
746, | ||
748, | ||
751, | ||
752, | ||
753, | ||
756, | ||
757, | ||
759, | ||
761, | ||
765, | ||
766, | ||
767, | ||
768, | ||
769, | ||
772, | ||
773, | ||
774, | ||
775, | ||
776, | ||
777, | ||
778, | ||
779, | ||
782, | ||
783, | ||
785, | ||
786, | ||
790, | ||
791, | ||
792, | ||
793, | ||
794, | ||
796, | ||
801, | ||
802, | ||
803, | ||
806, | ||
808, | ||
809, | ||
810, | ||
811, | ||
812, | ||
813, | ||
814, | ||
815, | ||
817, | ||
818, | ||
819, | ||
822, | ||
824, | ||
827, | ||
828, | ||
832, | ||
954, | ||
955, | ||
956, | ||
957, | ||
1117, | ||
1150, | ||
1153, | ||
1212, | ||
1220, | ||
1298, | ||
1299, | ||
1300, | ||
1305, | ||
1306, | ||
1307 | ||
], | ||
"quantity": 2, | ||
"scc_username": "UC7", | ||
"start_date": "2013-08-01T00:00:00Z" | ||
}, | ||
{ | ||
"id": 3, | ||
"part_number": "UNKNOWN-PART-NUMBER", | ||
"name": "SUSE Premium Fake - Worldwide", | ||
"quantity": 1, | ||
"start_date": "2015-01-31T00:00:00Z", | ||
"end_date": "2015-07-31T00:00:00Z", | ||
"scc_username": "UC7", | ||
"product_ids": [] | ||
} | ||
], | ||
"virtualization_groups": [], | ||
"systems": [ | ||
{ | ||
"cpus": 4, | ||
"id": 1000, | ||
"physical": true, | ||
"product_ids": [ | ||
814 | ||
], | ||
"virtual_system_ids": [] | ||
} | ||
] | ||
} |
2 changes: 2 additions & 0 deletions
2
src/test/resources/com/suse/matcher/scenarios/44/message_report.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Message,Additional data key,Additional data value | ||
no_products_associated,part_number,UNKNOWN-PART-NUMBER |
162 changes: 162 additions & 0 deletions
162
src/test/resources/com/suse/matcher/scenarios/44/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
{ | ||
"timestamp": "2015-05-01T00:00:00.000+02", | ||
"matches": [ | ||
{ | ||
"system_id": 1000, | ||
"subscription_id": 2, | ||
"product_id": 814, | ||
"cents": 100 | ||
} | ||
], | ||
"subscription_policies": { | ||
"2": "physical_only" | ||
}, | ||
"messages": [ | ||
{ | ||
"type": "no_products_associated", | ||
"data": { | ||
"part_number": "UNKNOWN-PART-NUMBER" | ||
} | ||
} | ||
], | ||
"subscriptions": [ | ||
{ | ||
"id": 1, | ||
"part_number": "051-004678", | ||
"name": "SUSE Premium Silver (30 SRs, valid for 12 Months) - EMEA Zone 2", | ||
"quantity": 1, | ||
"start_date": "2014-07-30T00:00:00Z", | ||
"end_date": "2015-07-31T00:00:00Z", | ||
"scc_username": "UC7" | ||
}, | ||
{ | ||
"id": 2, | ||
"part_number": "051-003964", | ||
"quantity": 2, | ||
"start_date": "2013-08-01T02:00:00.000+02", | ||
"end_date": "2015-07-31T02:00:00.000+02", | ||
"scc_username": "UC7", | ||
"product_ids": [ | ||
669, | ||
670, | ||
673, | ||
674, | ||
677, | ||
679, | ||
681, | ||
683, | ||
684, | ||
686, | ||
687, | ||
688, | ||
690, | ||
691, | ||
694, | ||
695, | ||
696, | ||
697, | ||
698, | ||
700, | ||
703, | ||
704, | ||
706, | ||
707, | ||
708, | ||
709, | ||
712, | ||
713, | ||
717, | ||
718, | ||
719, | ||
721, | ||
723, | ||
724, | ||
725, | ||
726, | ||
727, | ||
729, | ||
730, | ||
733, | ||
735, | ||
737, | ||
742, | ||
746, | ||
748, | ||
751, | ||
752, | ||
753, | ||
756, | ||
757, | ||
759, | ||
761, | ||
765, | ||
766, | ||
767, | ||
768, | ||
769, | ||
772, | ||
773, | ||
774, | ||
775, | ||
776, | ||
777, | ||
778, | ||
779, | ||
782, | ||
783, | ||
785, | ||
786, | ||
790, | ||
791, | ||
792, | ||
793, | ||
794, | ||
796, | ||
801, | ||
802, | ||
803, | ||
806, | ||
808, | ||
809, | ||
810, | ||
811, | ||
812, | ||
813, | ||
814, | ||
815, | ||
817, | ||
818, | ||
819, | ||
822, | ||
824, | ||
827, | ||
828, | ||
832, | ||
954, | ||
955, | ||
956, | ||
957, | ||
1117, | ||
1150, | ||
1153, | ||
1212, | ||
1220, | ||
1298, | ||
1299, | ||
1300, | ||
1305, | ||
1306, | ||
1307 | ||
] | ||
}, | ||
{ | ||
"id": 3, | ||
"part_number": "UNKNOWN-PART-NUMBER", | ||
"name": "SUSE Premium Fake - Worldwide", | ||
"quantity": 1, | ||
"start_date": "2015-01-31T00:00:00Z", | ||
"end_date": "2015-07-31T00:00:00Z", | ||
"scc_username": "UC7" | ||
} | ||
] | ||
} |
2 changes: 2 additions & 0 deletions
2
src/test/resources/com/suse/matcher/scenarios/44/subscription_report.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Part Number,Description,Policy,Total Quantity,Matched Quantity,Start Date,End Date | ||
051-003964,,Physical deployment only,2,1,2013-08-01,2015-07-31 |
1 change: 1 addition & 0 deletions
1
src/test/resources/com/suse/matcher/scenarios/44/unmatched_product_report.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Unmatched Product Name,System Name,System ID,CPUs |