@@ -8,23 +8,23 @@ use trustify_test_context::{TrustifyContext, subset::ContainsSubset};
88#[ test_context( TrustifyContext ) ]
99#[ rstest]
1010#[ case( // cpe search
11- Req { loc : Loc :: Id ( "cpe:/a:redhat:quay:3::el8" ) , ..Req :: default ( ) } ,
11+ Req { what : What :: Id ( "cpe:/a:redhat:quay:3::el8" ) , ..Req :: default ( ) } ,
1212 2
1313) ]
1414#[ case( // cpe latest search
15- Req { loc : Loc :: Id ( "cpe:/a:redhat:quay:3::el8" ) , latest: true , ..Req :: default ( ) } ,
15+ Req { what : What :: Id ( "cpe:/a:redhat:quay:3::el8" ) , latest: true , ..Req :: default ( ) } ,
1616 1
1717) ]
1818#[ case( // purl partial search
19- Req { loc : Loc :: Q ( "pkg:oci/quay-builder-qemu-rhcos-rhel8" ) , ancestors: Some ( 10 ) , ..Req :: default ( ) } ,
19+ Req { what : What :: Q ( "pkg:oci/quay-builder-qemu-rhcos-rhel8" ) , ancestors: Some ( 10 ) , ..Req :: default ( ) } ,
2020 18
2121) ]
2222#[ case( // purl partial search latest
23- Req { loc : Loc :: Q ( "pkg:oci/quay-builder-qemu-rhcos-rhel8" ) , ancestors: Some ( 10 ) , latest: true , ..Req :: default ( ) } ,
23+ Req { what : What :: Q ( "pkg:oci/quay-builder-qemu-rhcos-rhel8" ) , ancestors: Some ( 10 ) , latest: true , ..Req :: default ( ) } ,
2424 2
2525) ]
2626#[ case( // purl partial search latest
27- Req { loc : Loc :: Q ( "purl:name~quay-builder-qemu-rhcos-rhel8&purl:ty=oci" ) , ancestors: Some ( 10 ) , latest: true , ..Req :: default ( ) } ,
27+ Req { what : What :: Q ( "purl:name~quay-builder-qemu-rhcos-rhel8&purl:ty=oci" ) , ancestors: Some ( 10 ) , latest: true , ..Req :: default ( ) } ,
2828 7
2929) ]
3030#[ test_log:: test( actix_web:: test) ]
@@ -61,31 +61,31 @@ async fn resolve_rh_variant_latest_filter_container_cdx(
6161#[ test_context( TrustifyContext ) ]
6262#[ rstest]
6363#[ case( // cpe search
64- Req { loc : Loc :: Id ( "cpe:/a:redhat:rhel_eus:9.4::crb" ) , ..Req :: default ( ) } ,
64+ Req { what : What :: Id ( "cpe:/a:redhat:rhel_eus:9.4::crb" ) , ..Req :: default ( ) } ,
6565 2
6666) ]
6767#[ case( // cpe latest search
68- Req { loc : Loc :: Id ( "cpe:/a:redhat:rhel_eus:9.4::crb" ) , latest: true , ..Req :: default ( ) } ,
68+ Req { what : What :: Id ( "cpe:/a:redhat:rhel_eus:9.4::crb" ) , latest: true , ..Req :: default ( ) } ,
6969 1
7070) ]
7171#[ case( // purl partial search
72- Req { loc : Loc :: Q ( "pkg:rpm/redhat/NetworkManager-libnm" ) , ancestors: Some ( 10 ) , ..Req :: default ( ) } ,
72+ Req { what : What :: Q ( "pkg:rpm/redhat/NetworkManager-libnm" ) , ancestors: Some ( 10 ) , ..Req :: default ( ) } ,
7373 30
7474) ]
7575#[ case( // purl partial latest search
76- Req { loc : Loc :: Q ( "pkg:rpm/redhat/NetworkManager-libnm" ) , ancestors: Some ( 10 ) , latest: true , ..Req :: default ( ) } ,
76+ Req { what : What :: Q ( "pkg:rpm/redhat/NetworkManager-libnm" ) , ancestors: Some ( 10 ) , latest: true , ..Req :: default ( ) } ,
7777 15
7878) ]
7979#[ case( // purl more specific latest q search
80- Req { loc : Loc :: Q ( "pkg:rpm/redhat/NetworkManager-libnm-devel@" ) , latest: true , ..Req :: default ( ) } ,
80+ Req { what : What :: Q ( "pkg:rpm/redhat/NetworkManager-libnm-devel@" ) , latest: true , ..Req :: default ( ) } ,
8181 5
8282) ]
8383#[ case( // name exact search
84- Req { loc : Loc :: Id ( "NetworkManager-libnm-devel" ) , ..Req :: default ( ) } ,
84+ Req { what : What :: Id ( "NetworkManager-libnm-devel" ) , ..Req :: default ( ) } ,
8585 10
8686) ]
8787#[ case( // latest name exact search
88- Req { loc : Loc :: Id ( "NetworkManager-libnm-devel" ) , latest: true , ..Req :: default ( ) } ,
88+ Req { what : What :: Id ( "NetworkManager-libnm-devel" ) , latest: true , ..Req :: default ( ) } ,
8989 5
9090) ]
9191#[ test_log:: test( actix_web:: test) ]
@@ -120,27 +120,27 @@ async fn resolve_rh_variant_latest_filter_rpms_cdx(
120120#[ test_context( TrustifyContext ) ]
121121#[ rstest]
122122#[ case( // cpe search
123- Req { loc : Loc :: Id ( "cpe:/a:redhat:camel_quarkus:3" ) , ..Req :: default ( ) } ,
123+ Req { what : What :: Id ( "cpe:/a:redhat:camel_quarkus:3" ) , ..Req :: default ( ) } ,
124124 2
125125) ]
126126#[ case( // cpe latest search
127- Req { loc : Loc :: Id ( "cpe:/a:redhat:camel_quarkus:3" ) , latest: true , ..Req :: default ( ) } ,
127+ Req { what : What :: Id ( "cpe:/a:redhat:camel_quarkus:3" ) , latest: true , ..Req :: default ( ) } ,
128128 1
129129) ]
130130#[ case( // purl partial search
131- Req { loc : Loc :: Q ( "pkg:maven/io.vertx/vertx-core@" ) , ancestors: Some ( 10 ) , ..Req :: default ( ) } ,
131+ Req { what : What :: Q ( "pkg:maven/io.vertx/vertx-core@" ) , ancestors: Some ( 10 ) , ..Req :: default ( ) } ,
132132 6
133133) ]
134134#[ case( // purl partial latest search
135- Req { loc : Loc :: Q ( "pkg:maven/io.vertx/vertx-core@" ) , latest: true , ..Req :: default ( ) } ,
135+ Req { what : What :: Q ( "pkg:maven/io.vertx/vertx-core@" ) , latest: true , ..Req :: default ( ) } ,
136136 2
137137) ]
138138#[ case( // name exact search
139- Req { loc : Loc :: Id ( "vertx-core" ) , ..Req :: default ( ) } ,
139+ Req { what : What :: Id ( "vertx-core" ) , ..Req :: default ( ) } ,
140140 6
141141) ]
142142#[ case( // latest name exact search
143- Req { loc : Loc :: Id ( "vertx-core" ) , latest: true , ..Req :: default ( ) } ,
143+ Req { what : What :: Id ( "vertx-core" ) , latest: true , ..Req :: default ( ) } ,
144144 2
145145) ]
146146#[ test_log:: test( actix_web:: test) ]
@@ -201,7 +201,7 @@ async fn test_tc2606(
201201 let response = app
202202 . req ( Req {
203203 latest : true ,
204- loc : Loc :: Id ( "cpe:/a:redhat:rhel_eus:9.4::appstream" ) ,
204+ what : What :: Id ( "cpe:/a:redhat:rhel_eus:9.4::appstream" ) ,
205205 descendants : Some ( 1 ) ,
206206 ..Req :: default ( )
207207 } )
@@ -300,7 +300,7 @@ async fn test_tc2677(
300300 let response = app
301301 . req ( Req {
302302 latest : true ,
303- loc : Loc :: Id ( "cpe:/a:redhat:3scale:2.15::el9" ) ,
303+ what : What :: Id ( "cpe:/a:redhat:3scale:2.15::el9" ) ,
304304 descendants : Some ( 10 ) ,
305305 ..Req :: default ( )
306306 } )
@@ -364,11 +364,11 @@ async fn test_tc2677(
364364#[ test_context( TrustifyContext ) ]
365365#[ rstest]
366366#[ case( // non-latest
367- Req { loc : Loc :: Id ( "pkg:maven/io.vertx/vertx-core" ) , ..Req :: default ( ) } ,
367+ Req { what : What :: Id ( "pkg:maven/io.vertx/vertx-core" ) , ..Req :: default ( ) } ,
368368 0
369369) ]
370370#[ case( // latest
371- Req { loc : Loc :: Id ( "pkg:maven/io.vertx/vertx-core" ) , latest: true , ..Req :: default ( ) } ,
371+ Req { what : What :: Id ( "pkg:maven/io.vertx/vertx-core" ) , latest: true , ..Req :: default ( ) } ,
372372 2
373373) ]
374374#[ test_log:: test( actix_web:: test) ]
@@ -425,7 +425,7 @@ async fn test_tc2578(
425425 let response = app
426426 . req ( Req {
427427 latest : true ,
428- loc : Loc :: Id ( "cpe:/a:redhat:jboss_enterprise_application_platform:7.4" ) ,
428+ what : What :: Id ( "cpe:/a:redhat:jboss_enterprise_application_platform:7.4" ) ,
429429 descendants : Some ( 100 ) ,
430430 ..Req :: default ( )
431431 } )
0 commit comments