@@ -938,6 +938,7 @@ func TestBuildGoLibraries(t *testing.T) {
938938 {Path : "google/bigtable/v2" },
939939 {Path : "google/bigtable/admin/v2" },
940940 },
941+ Keep : []string {"README.md" },
941942 Go : & config.GoModule {
942943 GoAPIs : []* config.GoAPI {
943944 {Path : "google/bigtable/admin/v2" , NoMetadata : true , ProtoOnly : true },
@@ -1011,6 +1012,48 @@ func TestBuildGoLibraries(t *testing.T) {
10111012 },
10121013 },
10131014 },
1015+ {
1016+ name : "firestore keep" ,
1017+ input : & MigrationInput {
1018+ librarianState : & legacyconfig.LibrarianState {
1019+ Libraries : []* legacyconfig.LibraryState {
1020+ {
1021+ ID : "firestore" ,
1022+ },
1023+ },
1024+ },
1025+ librarianConfig : & legacyconfig.LibrarianConfig {},
1026+ repoPath : "testdata/google-cloud-go" ,
1027+ googleapisDir : "testdata/googleapis" ,
1028+ },
1029+ want : []* config.Library {
1030+ {
1031+ Name : "firestore" ,
1032+ Keep : []string {"README.md" },
1033+ },
1034+ },
1035+ },
1036+ {
1037+ name : "pubsub/v2 keep" ,
1038+ input : & MigrationInput {
1039+ librarianState : & legacyconfig.LibrarianState {
1040+ Libraries : []* legacyconfig.LibraryState {
1041+ {
1042+ ID : "pubsub/v2" ,
1043+ },
1044+ },
1045+ },
1046+ librarianConfig : & legacyconfig.LibrarianConfig {},
1047+ repoPath : "testdata/google-cloud-go" ,
1048+ googleapisDir : "testdata/googleapis" ,
1049+ },
1050+ want : []* config.Library {
1051+ {
1052+ Name : "pubsub/v2" ,
1053+ Keep : []string {"README.md" },
1054+ },
1055+ },
1056+ },
10141057 } {
10151058 t .Run (test .name , func (t * testing.T ) {
10161059 got , err := buildGoLibraries (test .input )
0 commit comments