@@ -212,7 +212,7 @@ impl AggregatorHandler for AggregatorHTTPClient {
212
212
/// List snapshots
213
213
async fn list_snapshots ( & self ) -> Result < Vec < Snapshot > , AggregatorHandlerError > {
214
214
debug ! ( "List snapshots" ) ;
215
- let url = format ! ( "{}/snapshots" , self . aggregator_endpoint) ;
215
+ let url = format ! ( "{}/artifact/ snapshots" , self . aggregator_endpoint) ;
216
216
let response = self
217
217
. prepare_request_builder ( Client :: new ( ) . get ( url. clone ( ) ) )
218
218
. await
@@ -246,7 +246,7 @@ impl AggregatorHandler for AggregatorHTTPClient {
246
246
/// Get snapshot details
247
247
async fn get_snapshot_details ( & self , digest : & str ) -> Result < Snapshot , AggregatorHandlerError > {
248
248
debug ! ( "Details snapshot {}" , digest) ;
249
- let url = format ! ( "{}/snapshot/{}" , self . aggregator_endpoint, digest) ;
249
+ let url = format ! ( "{}/artifact/ snapshot/{}" , self . aggregator_endpoint, digest) ;
250
250
let response = self
251
251
. prepare_request_builder ( Client :: new ( ) . get ( url. clone ( ) ) )
252
252
. await
@@ -446,7 +446,7 @@ mod tests {
446
446
let ( server, config) = setup_test ( ) ;
447
447
let snapshots_expected = fake_data:: snapshots ( 5 ) ;
448
448
let _snapshots_mock = server. mock ( |when, then| {
449
- when. path ( "/snapshots" ) ;
449
+ when. path ( "/artifact/ snapshots" ) ;
450
450
then. status ( 200 ) . body ( json ! ( snapshots_expected) . to_string ( ) ) ;
451
451
} ) ;
452
452
let aggregator_client = AggregatorHTTPClient :: new (
@@ -463,7 +463,7 @@ mod tests {
463
463
async fn test_list_snapshots_ko_412 ( ) {
464
464
let ( server, config) = setup_test ( ) ;
465
465
let _snapshots_mock = server. mock ( |when, then| {
466
- when. path ( "/snapshots" ) ;
466
+ when. path ( "/artifact/ snapshots" ) ;
467
467
then. status ( 412 ) . header (
468
468
MITHRIL_API_VERSION_HEADER ,
469
469
APIVersionProvider :: compute_all_versions_sorted ( )
@@ -488,7 +488,7 @@ mod tests {
488
488
async fn test_list_snapshots_ko_500 ( ) {
489
489
let ( server, config) = setup_test ( ) ;
490
490
let _snapshots_mock = server. mock ( |when, then| {
491
- when. path ( "/snapshots" ) ;
491
+ when. path ( "/artifact/ snapshots" ) ;
492
492
then. status ( 500 ) ;
493
493
} ) ;
494
494
let aggregator_client = AggregatorHTTPClient :: new (
@@ -518,7 +518,7 @@ mod tests {
518
518
let ( server, config) = setup_test ( ) ;
519
519
let snapshot_expected = fake_data:: snapshots ( 1 ) . first ( ) . unwrap ( ) . to_owned ( ) ;
520
520
let _snapshots_mock = server. mock ( |when, then| {
521
- when. path ( format ! ( "/snapshot/{digest}" ) ) ;
521
+ when. path ( format ! ( "/artifact/ snapshot/{digest}" ) ) ;
522
522
then. status ( 200 ) . body ( json ! ( snapshot_expected) . to_string ( ) ) ;
523
523
} ) ;
524
524
let aggregator_client = AggregatorHTTPClient :: new (
@@ -536,7 +536,7 @@ mod tests {
536
536
let digest = "digest123" ;
537
537
let ( server, config) = setup_test ( ) ;
538
538
let _snapshots_mock = server. mock ( |when, then| {
539
- when. path ( format ! ( "/snapshot/{digest}" ) ) ;
539
+ when. path ( format ! ( "/artifact/ snapshot/{digest}" ) ) ;
540
540
then. status ( 404 ) ;
541
541
} ) ;
542
542
let aggregator_client = AggregatorHTTPClient :: new (
@@ -553,7 +553,7 @@ mod tests {
553
553
let ( server, config) = setup_test ( ) ;
554
554
let digest = "digest123" ;
555
555
let _snapshots_mock = server. mock ( |when, then| {
556
- when. path ( format ! ( "/snapshot/{digest}" ) ) ;
556
+ when. path ( format ! ( "/artifact/ snapshot/{digest}" ) ) ;
557
557
then. status ( 412 )
558
558
. header ( MITHRIL_API_VERSION_HEADER , "0.0.999" ) ;
559
559
} ) ;
@@ -575,7 +575,7 @@ mod tests {
575
575
let digest = "digest123" ;
576
576
let ( server, config) = setup_test ( ) ;
577
577
let _snapshots_mock = server. mock ( |when, then| {
578
- when. path ( format ! ( "/snapshot/{digest}" ) ) ;
578
+ when. path ( format ! ( "/artifact/ snapshot/{digest}" ) ) ;
579
579
then. status ( 500 ) ;
580
580
} ) ;
581
581
let aggregator_client = AggregatorHTTPClient :: new (
0 commit comments