@@ -67,7 +67,7 @@ const tenantArtifactsResponse = () =>
6767 jsonResponse ( {
6868 data : [
6969 {
70- type : "registry-tenant- artifacts" ,
70+ type : "registry-artifacts" ,
7171 id : "prowler-aws" ,
7272 attributes : {
7373 version_spec : "latest" ,
@@ -199,7 +199,7 @@ describe("Registry guarded reads", () => {
199199 } ) ;
200200 expect ( fetchMock . mock . calls . map ( ( [ url ] ) => url ) ) . toEqual ( [
201201 "https://api.test/api/v1/registry/credential" ,
202- "https://api.test/api/v1/registry/my- artifacts" ,
202+ "https://api.test/api/v1/registry/artifacts" ,
203203 "https://api.test/api/v1/registry/providers" ,
204204 "https://api.test/api/v1/registry/available-artifacts?page%5Bnumber%5D=1&page%5Bsize%5D=100" ,
205205 ] ) ;
@@ -463,7 +463,7 @@ describe("Registry guarded reads", () => {
463463 expect ( fetchMock . mock . calls . map ( ( [ url ] ) => url ) ) . toEqual ( [
464464 "https://api.test/api/v1/registry/credential" ,
465465 "https://api.test/api/v1/registry/credential" ,
466- "https://api.test/api/v1/registry/my- artifacts" ,
466+ "https://api.test/api/v1/registry/artifacts" ,
467467 ] ) ;
468468 expect ( fetchMock ) . toHaveBeenNthCalledWith (
469469 1 ,
@@ -674,7 +674,7 @@ describe("Registry guarded reads", () => {
674674 jsonResponse ( {
675675 data : [
676676 {
677- type : "registry-tenant- artifacts" ,
677+ type : "registry-artifacts" ,
678678 id : "later-guard" ,
679679 attributes : { version_spec : "2.0.0" } ,
680680 } ,
@@ -697,13 +697,15 @@ describe("Registry guarded reads", () => {
697697 } ) ;
698698 expect ( fetchMock ) . toHaveBeenNthCalledWith (
699699 1 ,
700- "https://api.test/api/v1/registry/my- artifacts" ,
700+ "https://api.test/api/v1/registry/artifacts" ,
701701 expect . objectContaining ( {
702702 body : JSON . stringify ( {
703703 data : {
704- type : "registry-tenant-artifacts" ,
705- id : "later-guard" ,
706- attributes : { version_spec : "2.0.0" } ,
704+ type : "registry-artifacts" ,
705+ attributes : {
706+ normalized_name : "later-guard" ,
707+ version_spec : "2.0.0" ,
708+ } ,
707709 } ,
708710 } ) ,
709711 cache : "no-store" ,
@@ -720,7 +722,7 @@ describe("Registry guarded reads", () => {
720722 jsonResponse ( {
721723 data : [
722724 {
723- type : "registry-tenant- artifacts" ,
725+ type : "registry-artifacts" ,
724726 id : "later-guard" ,
725727 attributes : { version_spec : "latest" } ,
726728 } ,
@@ -734,13 +736,15 @@ describe("Registry guarded reads", () => {
734736 // Then
735737 expect ( fetchMock ) . toHaveBeenNthCalledWith (
736738 1 ,
737- "https://api.test/api/v1/registry/my- artifacts" ,
739+ "https://api.test/api/v1/registry/artifacts" ,
738740 expect . objectContaining ( {
739741 body : JSON . stringify ( {
740742 data : {
741- type : "registry-tenant-artifacts" ,
742- id : "later-guard" ,
743- attributes : { version_spec : "latest" } ,
743+ type : "registry-artifacts" ,
744+ attributes : {
745+ normalized_name : "later-guard" ,
746+ version_spec : "latest" ,
747+ } ,
744748 } ,
745749 } ) ,
746750 } ) ,
@@ -790,7 +794,7 @@ describe("Registry guarded reads", () => {
790794 expect ( result ) . toEqual ( { status : "confirmed" , tenantArtifacts : [ ] } ) ;
791795 expect ( fetchMock ) . toHaveBeenNthCalledWith (
792796 1 ,
793- "https://api.test/api/v1/registry/my- artifacts/guard%2Fwith%20space" ,
797+ "https://api.test/api/v1/registry/artifacts/guard%2Fwith%20space" ,
794798 expect . objectContaining ( { cache : "no-store" , method : "DELETE" } ) ,
795799 ) ;
796800 } ) ;
@@ -807,7 +811,7 @@ describe("Registry guarded reads", () => {
807811 {
808812 data : [
809813 {
810- type : "registry-tenant- artifacts" ,
814+ type : "registry-artifacts" ,
811815 id : "later-guard" ,
812816 attributes : { version_spec : "latest" } ,
813817 } ,
0 commit comments