@@ -222,8 +222,8 @@ func Test_parseFilters(t *testing.T) {
222222
223223func Test_fetchRepoIndex (t * testing.T ) {
224224 fakeServer := newFakeServer (t , map [string ]* http.Response {
225- "/index.yaml" : & http. Response {StatusCode : 200 },
226- "/subpath/index.yaml" : & http. Response {StatusCode : 200 },
225+ "/index.yaml" : {StatusCode : 200 },
226+ "/subpath/index.yaml" : {StatusCode : 200 },
227227 })
228228 defer fakeServer .Close ()
229229 addr := fakeServer .URL
@@ -397,19 +397,19 @@ func Test_fetchAndImportIcon(t *testing.T) {
397397 svgHeader .Set ("Content-Type" , "image/svg" )
398398
399399 server := newFakeServer (t , map [string ]* http.Response {
400- "/valid_icon.png" : & http. Response {
400+ "/valid_icon.png" : {
401401 StatusCode : 200 ,
402402 Body : io .NopCloser (bytes .NewReader (iconBytes ())),
403403 },
404- "/valid_svg_icon.svg" : & http. Response {
404+ "/valid_svg_icon.svg" : {
405405 StatusCode : 200 ,
406406 Body : io .NopCloser (bytes .NewReader ([]byte ("<svg width='100' height='100'></svg>" ))),
407407 Header : svgHeader ,
408408 },
409- "/download_fail.png" : & http. Response {
409+ "/download_fail.png" : {
410410 StatusCode : 500 ,
411411 },
412- "/invalid_icon.png" : & http. Response {
412+ "/invalid_icon.png" : {
413413 StatusCode : 200 ,
414414 Body : io .NopCloser (bytes .NewReader ([]byte ("not a valid png" ))),
415415 },
@@ -707,7 +707,7 @@ func Test_fetchAndImportFiles(t *testing.T) {
707707func Test_ociAPICli (t * testing.T ) {
708708 t .Run ("TagList - failed request" , func (t * testing.T ) {
709709 server := newFakeServer (t , map [string ]* http.Response {
710- "/v2/apache/tags/list" : & http. Response {
710+ "/v2/apache/tags/list" : {
711711 StatusCode : 500 ,
712712 },
713713 })
@@ -736,7 +736,7 @@ func Test_ociAPICli(t *testing.T) {
736736
737737 t .Run ("TagList - successful request" , func (t * testing.T ) {
738738 server := newFakeServer (t , map [string ]* http.Response {
739- "/v2/apache/tags/list" : & http. Response {
739+ "/v2/apache/tags/list" : {
740740 StatusCode : 200 ,
741741 Body : io .NopCloser (strings .NewReader (`{"name":"apache","tags":["7.5.1","8.1.1"]}` )),
742742 },
@@ -760,7 +760,7 @@ func Test_ociAPICli(t *testing.T) {
760760
761761 t .Run ("IsHelmChart - failed request" , func (t * testing.T ) {
762762 server := newFakeServer (t , map [string ]* http.Response {
763- "/v2/apache-bad/manifests/7.5.1" : & http. Response {
763+ "/v2/apache-bad/manifests/7.5.1" : {
764764 StatusCode : 500 ,
765765 },
766766 })
@@ -854,7 +854,7 @@ func Test_ociAPICli(t *testing.T) {
854854
855855 t .Run ("CatalogAvailable - successful request" , func (t * testing.T ) {
856856 server := newFakeServer (t , map [string ]* http.Response {
857- "/v2/test/project/charts-index/manifests/latest" : & http. Response {
857+ "/v2/test/project/charts-index/manifests/latest" : {
858858 StatusCode : 200 ,
859859 Body : io .NopCloser (strings .NewReader (chartsIndexManifestJSON )),
860860 },
@@ -882,7 +882,7 @@ func Test_ociAPICli(t *testing.T) {
882882
883883 t .Run ("CatalogAvailable - returns false for incorrect media type" , func (t * testing.T ) {
884884 server := newFakeServer (t , map [string ]* http.Response {
885- "/v2/test/project/charts-index/manifests/latest" : & http. Response {
885+ "/v2/test/project/charts-index/manifests/latest" : {
886886 StatusCode : 200 ,
887887 Body : io .NopCloser (strings .NewReader (`{"config": {"mediaType": "something-else"}}` )),
888888 },
@@ -909,7 +909,7 @@ func Test_ociAPICli(t *testing.T) {
909909
910910 t .Run ("CatalogAvailable - returns false for a 404" , func (t * testing.T ) {
911911 server := newFakeServer (t , map [string ]* http.Response {
912- "/v2/test/project/charts-index/manifests/latest" : & http. Response {
912+ "/v2/test/project/charts-index/manifests/latest" : {
913913 StatusCode : 200 ,
914914 Body : io .NopCloser (strings .NewReader (`{"config": {"mediaType": "something-else"}}` )),
915915 },
@@ -1029,11 +1029,11 @@ func Test_ociAPICli(t *testing.T) {
10291029
10301030 t .Run ("Catalog - successful request" , func (t * testing.T ) {
10311031 server := newFakeServer (t , map [string ]* http.Response {
1032- "/v2/test/project/charts-index/manifests/latest" : & http. Response {
1032+ "/v2/test/project/charts-index/manifests/latest" : {
10331033 StatusCode : 200 ,
10341034 Body : io .NopCloser (strings .NewReader (chartsIndexManifestJSON )),
10351035 },
1036- "/v2/test/project/charts-index/blobs/sha256:f9f7df0ae3f50aaf9ff390034cec4286d2aa43f061ce4bc7aa3c9ac862800aba" : & http. Response {
1036+ "/v2/test/project/charts-index/blobs/sha256:f9f7df0ae3f50aaf9ff390034cec4286d2aa43f061ce4bc7aa3c9ac862800aba" : {
10371037 StatusCode : 200 ,
10381038 Body : io .NopCloser (strings .NewReader (chartsIndexMultipleJSON )),
10391039 },
0 commit comments