@@ -383,14 +383,14 @@ func TestDockerRun(t *testing.T) {
383383 t .Fatal (err )
384384 }
385385
386- releaseInitRequest := & ReleaseRequest {
386+ releaseInitRequest := & ReleaseInitRequest {
387387 Cfg : & config.Config {
388388 Repo : repoDir ,
389389 },
390- State : state ,
391- Output : testOutput ,
392- GlobalConfig : & config.GlobalConfig {},
393- partialRepoDir : partialRepoDir ,
390+ State : state ,
391+ Output : testOutput ,
392+ LibrarianConfig : & config.LibrarianConfig {},
393+ partialRepoDir : partialRepoDir ,
394394 }
395395
396396 defer os .RemoveAll (partialRepoDir )
@@ -420,14 +420,14 @@ func TestDockerRun(t *testing.T) {
420420 t .Fatal (err )
421421 }
422422
423- releaseInitRequest := & ReleaseRequest {
423+ releaseInitRequest := & ReleaseInitRequest {
424424 Cfg : & config.Config {
425425 Repo : repoDir ,
426426 },
427- State : state ,
428- partialRepoDir : partialRepoDir ,
429- Output : testOutput ,
430- GlobalConfig : & config.GlobalConfig {},
427+ State : state ,
428+ partialRepoDir : partialRepoDir ,
429+ Output : testOutput ,
430+ LibrarianConfig : & config.LibrarianConfig {},
431431 }
432432 defer os .RemoveAll (partialRepoDir )
433433
@@ -442,7 +442,7 @@ func TestDockerRun(t *testing.T) {
442442 Image : mockImage ,
443443 },
444444 runCommand : func (ctx context.Context , d * Docker ) error {
445- releaseInitRequest := & ReleaseRequest {
445+ releaseInitRequest := & ReleaseInitRequest {
446446 Cfg : & config.Config {
447447 Repo : os .TempDir (),
448448 },
@@ -466,15 +466,15 @@ func TestDockerRun(t *testing.T) {
466466 if err := os .MkdirAll (filepath .Join (repoDir , config .LibrarianDir ), 0755 ); err != nil {
467467 t .Fatal (err )
468468 }
469- releaseInitRequest := & ReleaseRequest {
469+ releaseInitRequest := & ReleaseInitRequest {
470470 Cfg : & config.Config {
471471 Repo : repoDir ,
472472 },
473- State : state ,
474- partialRepoDir : partialRepoDir ,
475- Output : testOutput ,
476- LibraryID : testLibraryID ,
477- GlobalConfig : & config.GlobalConfig {},
473+ State : state ,
474+ partialRepoDir : partialRepoDir ,
475+ Output : testOutput ,
476+ LibraryID : testLibraryID ,
477+ LibrarianConfig : & config.LibrarianConfig {},
478478 }
479479 defer os .RemoveAll (partialRepoDir )
480480
@@ -504,16 +504,16 @@ func TestDockerRun(t *testing.T) {
504504 t .Fatal (err )
505505 }
506506
507- releaseInitRequest := & ReleaseRequest {
507+ releaseInitRequest := & ReleaseInitRequest {
508508 Cfg : & config.Config {
509509 Repo : os .TempDir (),
510510 },
511- State : state ,
512- partialRepoDir : partialRepoDir ,
513- Output : testOutput ,
514- LibraryID : testLibraryID ,
515- LibraryVersion : "1.2.3" ,
516- GlobalConfig : & config.GlobalConfig {},
511+ State : state ,
512+ partialRepoDir : partialRepoDir ,
513+ Output : testOutput ,
514+ LibraryID : testLibraryID ,
515+ LibraryVersion : "1.2.3" ,
516+ LibrarianConfig : & config.LibrarianConfig {},
517517 }
518518 defer os .RemoveAll (partialRepoDir )
519519
@@ -568,15 +568,15 @@ func TestPartialCopyRepo(t *testing.T) {
568568 t .Parallel ()
569569 for _ , test := range []struct {
570570 name string
571- request * ReleaseRequest
571+ request * ReleaseInitRequest
572572 includedFiles []string
573573 excludedFiles []string
574574 wantErr bool
575575 wantErrMsg string
576576 }{
577577 {
578578 name : "copy all libraries and required files to partial repo" ,
579- request : & ReleaseRequest {
579+ request : & ReleaseInitRequest {
580580 Cfg : & config.Config {
581581 Repo : filepath .Join (os .TempDir (), "repo" ),
582582 },
@@ -599,7 +599,7 @@ func TestPartialCopyRepo(t *testing.T) {
599599 },
600600 },
601601 partialRepoDir : filepath .Join (os .TempDir (), "partial-repo" ),
602- GlobalConfig : & config.GlobalConfig {
602+ LibrarianConfig : & config.LibrarianConfig {
603603 GlobalFilesAllowlist : []* config.GlobalFile {
604604 {
605605 Path : "read/one.txt" ,
@@ -630,7 +630,7 @@ func TestPartialCopyRepo(t *testing.T) {
630630 },
631631 {
632632 name : "copy one library and required files to partial repo" ,
633- request : & ReleaseRequest {
633+ request : & ReleaseInitRequest {
634634 Cfg : & config.Config {
635635 Repo : filepath .Join (os .TempDir (), "repo" ),
636636 },
@@ -654,7 +654,7 @@ func TestPartialCopyRepo(t *testing.T) {
654654 },
655655 },
656656 partialRepoDir : filepath .Join (os .TempDir (), "partial-repo" ),
657- GlobalConfig : & config.GlobalConfig {
657+ LibrarianConfig : & config.LibrarianConfig {
658658 GlobalFilesAllowlist : []* config.GlobalFile {
659659 {
660660 Path : "read/one.txt" ,
@@ -686,7 +686,7 @@ func TestPartialCopyRepo(t *testing.T) {
686686 },
687687 {
688688 name : "copy one library with empty initial directory" ,
689- request : & ReleaseRequest {
689+ request : & ReleaseInitRequest {
690690 Cfg : & config.Config {
691691 Repo : filepath .Join (os .TempDir (), "repo" ),
692692 WorkRoot : filepath .Join (os .TempDir (), time .Now ().String ()),
@@ -710,7 +710,7 @@ func TestPartialCopyRepo(t *testing.T) {
710710 },
711711 },
712712 },
713- GlobalConfig : & config.GlobalConfig {
713+ LibrarianConfig : & config.LibrarianConfig {
714714 GlobalFilesAllowlist : []* config.GlobalFile {},
715715 },
716716 },
@@ -726,7 +726,7 @@ func TestPartialCopyRepo(t *testing.T) {
726726 },
727727 {
728728 name : "invalid partial repo dir" ,
729- request : & ReleaseRequest {
729+ request : & ReleaseInitRequest {
730730 Cfg : & config.Config {
731731 Repo : os .TempDir (),
732732 },
@@ -737,7 +737,7 @@ func TestPartialCopyRepo(t *testing.T) {
737737 },
738738 {
739739 name : "invalid source repo dir" ,
740- request : & ReleaseRequest {
740+ request : & ReleaseInitRequest {
741741 Cfg : & config.Config {
742742 Repo : "/non-existent-path" ,
743743 },
@@ -1167,7 +1167,7 @@ func TestDocker_runCommand(t *testing.T) {
11671167 }
11681168}
11691169
1170- func prepareRepo (t * testing.T , request * ReleaseRequest ) error {
1170+ func prepareRepo (t * testing.T , request * ReleaseInitRequest ) error {
11711171 t .Helper ()
11721172 emptyFilename := "empty.txt"
11731173 repo := request .Cfg .Repo
@@ -1192,7 +1192,7 @@ func prepareRepo(t *testing.T, request *ReleaseRequest) error {
11921192 return err
11931193 }
11941194 // Create global files.
1195- for _ , globalFile := range request .GlobalConfig .GlobalFilesAllowlist {
1195+ for _ , globalFile := range request .LibrarianConfig .GlobalFilesAllowlist {
11961196 filename := filepath .Join (repo , globalFile .Path )
11971197 if err := os .MkdirAll (filepath .Dir (filename ), 0755 ); err != nil {
11981198 return err
0 commit comments