@@ -38,7 +38,7 @@ import (
3838// rather than an ambiguous empty string.
3939const testUnusedStringParam = ""
4040
41- func TestReleaseCommand (t * testing.T ) {
41+ func TestBumpCommand (t * testing.T ) {
4242 testhelper .RequireCommand (t , "git" )
4343
4444 for _ , test := range []struct {
@@ -51,7 +51,7 @@ func TestReleaseCommand(t *testing.T) {
5151 }{
5252 {
5353 name : "library name" ,
54- args : []string {"librarian" , "release " , sample .Lib1Name },
54+ args : []string {"librarian" , "bump " , sample .Lib1Name },
5555 cfg : sample .Config (),
5656 withChanges : []string {filepath .Join (sample .Lib1Output , "src" , "lib.rs" )},
5757 wantCfg : func () * config.Config {
@@ -63,7 +63,7 @@ func TestReleaseCommand(t *testing.T) {
6363 },
6464 {
6565 name : "library name and explicit version" ,
66- args : []string {"librarian" , "release " , sample .Lib1Name , "--version=1.2.3" },
66+ args : []string {"librarian" , "bump " , sample .Lib1Name , "--version=1.2.3" },
6767 cfg : sample .Config (),
6868 withChanges : []string {filepath .Join (sample .Lib1Output , "src" , "lib.rs" )},
6969 wantCfg : func () * config.Config {
@@ -75,7 +75,7 @@ func TestReleaseCommand(t *testing.T) {
7575 },
7676 {
7777 name : "all flag all have changes" ,
78- args : []string {"librarian" , "release " , "--all" },
78+ args : []string {"librarian" , "bump " , "--all" },
7979 cfg : sample .Config (),
8080 withChanges : []string {
8181 filepath .Join (sample .Lib1Output , "src" , "lib.rs" ),
@@ -91,7 +91,7 @@ func TestReleaseCommand(t *testing.T) {
9191 },
9292 {
9393 name : "all flag 1 has changes" ,
94- args : []string {"librarian" , "release " , "--all" },
94+ args : []string {"librarian" , "bump " , "--all" },
9595 cfg : sample .Config (),
9696 withChanges : []string {filepath .Join (sample .Lib1Output , "src" , "lib.rs" )},
9797 wantCfg : func () * config.Config {
@@ -103,7 +103,7 @@ func TestReleaseCommand(t *testing.T) {
103103 },
104104 {
105105 name : "preview library released" ,
106- args : []string {"librarian" , "release " , sample .Lib1Name },
106+ args : []string {"librarian" , "bump " , sample .Lib1Name },
107107 withChanges : []string {filepath .Join (sample .Lib1Output , "src" , "lib.rs" )},
108108 cfg : sample .Config (),
109109 previewCfg : sample .PreviewConfig (),
@@ -116,7 +116,7 @@ func TestReleaseCommand(t *testing.T) {
116116 },
117117 {
118118 name : "all preview libraries released" ,
119- args : []string {"librarian" , "release " , "--all" },
119+ args : []string {"librarian" , "bump " , "--all" },
120120 withChanges : []string {
121121 filepath .Join (sample .Lib1Output , "src" , "lib.rs" ),
122122 filepath .Join (sample .Lib2Output , "src" , "lib.rs" ),
@@ -177,7 +177,7 @@ func TestReleaseCommand(t *testing.T) {
177177 }
178178}
179179
180- func TestReleaseCommand_Error (t * testing.T ) {
180+ func TestBumpCommand_Error (t * testing.T ) {
181181 testhelper .RequireCommand (t , "git" )
182182
183183 for _ , test := range []struct {
@@ -189,34 +189,34 @@ func TestReleaseCommand_Error(t *testing.T) {
189189 }{
190190 {
191191 name : "no args" ,
192- args : []string {"librarian" , "release " },
192+ args : []string {"librarian" , "bump " },
193193 wantErr : errMissingLibraryOrAllFlag ,
194194 },
195195 {
196196 name : "library name and all flag" ,
197- args : []string {"librarian" , "release " , "foo" , "--all" },
197+ args : []string {"librarian" , "bump " , "foo" , "--all" },
198198 wantErr : errBothLibraryAndAllFlag ,
199199 },
200200 {
201201 name : "version flag and all flag" ,
202- args : []string {"librarian" , "release " , "--version=1.2.3" , "--all" },
202+ args : []string {"librarian" , "bump " , "--version=1.2.3" , "--all" },
203203 wantErr : errBothVersionAndAllFlag ,
204204 },
205205 {
206206 name : "missing librarian yaml file" ,
207- args : []string {"librarian" , "release " , "--all" },
207+ args : []string {"librarian" , "bump " , "--all" },
208208 wantErr : errNoYaml ,
209209 },
210210 {
211211 name : "local repo is dirty" ,
212- args : []string {"librarian" , "release " , "--all" },
212+ args : []string {"librarian" , "bump " , "--all" },
213213 cfg : sample .Config (),
214214 dirty : true ,
215215 wantErr : git .ErrGitStatusUnclean ,
216216 },
217217 {
218218 name : "release config empty" ,
219- args : []string {"librarian" , "release " , "--all" },
219+ args : []string {"librarian" , "bump " , "--all" },
220220 cfg : func () * config.Config {
221221 c := sample .Config ()
222222
@@ -297,7 +297,7 @@ func TestLibraryByName(t *testing.T) {
297297 }
298298}
299299
300- func TestReleaseLibrary (t * testing.T ) {
300+ func TestBumpLibrary (t * testing.T ) {
301301 testhelper .RequireCommand (t , "git" )
302302
303303 tests := []struct {
@@ -359,9 +359,9 @@ func TestReleaseLibrary(t *testing.T) {
359359
360360 targetLibCfg := targetCfg .Libraries [0 ]
361361 // Unused string param: lastTag.
362- err := releaseLibrary (t .Context (), targetCfg , targetLibCfg , testUnusedStringParam , "git" , test .versionOverride , "" , nil )
362+ err := bumpLibrary (t .Context (), targetCfg , targetLibCfg , testUnusedStringParam , "git" , test .versionOverride , "" , nil )
363363 if err != nil {
364- t .Fatalf ("releaseLibrary () error = %v" , err )
364+ t .Fatalf ("bumpLibrary () error = %v" , err )
365365 }
366366 if targetLibCfg .Version != test .wantVersion {
367367 t .Errorf ("library %q version mismatch: want %q, got %q" , targetLibCfg .Name , test .wantVersion , targetLibCfg .Version )
@@ -371,7 +371,7 @@ func TestReleaseLibrary(t *testing.T) {
371371 }
372372}
373373
374- func TestReleaseAll (t * testing.T ) {
374+ func TestBumpAll (t * testing.T ) {
375375 testhelper .RequireCommand (t , "git" )
376376
377377 for _ , test := range []struct {
@@ -439,7 +439,7 @@ func TestReleaseAll(t *testing.T) {
439439 }
440440 testhelper .Setup (t , opts )
441441
442- err := releaseAll (t .Context (), targetCfg , sinceTag , "git" , "" , nil )
442+ err := bumpAll (t .Context (), targetCfg , sinceTag , "git" , "" , nil )
443443 if err != nil {
444444 t .Fatal (err )
445445 }
@@ -453,7 +453,7 @@ func TestReleaseAll(t *testing.T) {
453453 }
454454}
455455
456- func TestPostRelease (t * testing.T ) {
456+ func TestPostBump (t * testing.T ) {
457457 fakeCargo := filepath .Join (t .TempDir (), "fake-cargo" )
458458 for _ , test := range []struct {
459459 name string
@@ -508,9 +508,9 @@ func TestPostRelease(t *testing.T) {
508508 test .setup ()
509509 }
510510
511- err := postRelease (t .Context (), test .cfg )
511+ err := postBump (t .Context (), test .cfg )
512512 if (err != nil ) != test .wantErr {
513- t .Errorf ("postRelease () error = %v, wantErr %v" , err , test .wantErr )
513+ t .Errorf ("postBump () error = %v, wantErr %v" , err , test .wantErr )
514514 }
515515 })
516516 }
0 commit comments