@@ -72,23 +72,23 @@ func TestUpdateRootConfig(t *testing.T) {
7272 SpecificationFormat : "protobuf" ,
7373 },
7474 Source : map [string ]string {
75- "github-api" : server .URL ,
76- "github" : server .URL ,
77- "googleapis -root" : fmt .Sprintf ("%s/googleapis/googleapis/archive/old.tar.gz" , server .URL ),
78- "googleapis -sha256" : "old-sha-unused" ,
75+ "github-api" : server .URL ,
76+ "github" : server .URL ,
77+ "test -root" : fmt .Sprintf ("%s/googleapis/googleapis/archive/old.tar.gz" , server .URL ),
78+ "test -sha256" : "old-sha-unused" ,
7979 },
8080 Codec : map [string ]string {},
8181 }
8282 if err := WriteSidekickToml ("." , rootConfig ); err != nil {
8383 t .Fatal (err )
8484 }
8585
86- if err := UpdateRootConfig (rootConfig ); err != nil {
86+ if err := UpdateRootConfig (rootConfig , "test" ); err != nil {
8787 t .Fatal (err )
8888 }
8989
9090 got := & Config {}
91- contents , err := os .ReadFile (path .Join (tempDir , ".sidekick.toml" ))
91+ contents , err := os .ReadFile (path .Join (tempDir , configName ))
9292 if err != nil {
9393 t .Fatal (err )
9494 }
@@ -98,10 +98,10 @@ func TestUpdateRootConfig(t *testing.T) {
9898 want := & Config {
9999 General : rootConfig .General ,
100100 Source : map [string ]string {
101- "github-api" : server .URL ,
102- "github" : server .URL ,
103- "googleapis -root" : fmt .Sprintf ("%s/googleapis/googleapis/archive/%s.tar.gz" , server .URL , latestSha ),
104- "googleapis -sha256" : latestShaContentsHash ,
101+ "github-api" : server .URL ,
102+ "github" : server .URL ,
103+ "test -root" : fmt .Sprintf ("%s/googleapis/googleapis/archive/%s.tar.gz" , server .URL , latestSha ),
104+ "test -sha256" : latestShaContentsHash ,
105105 },
106106 }
107107
@@ -258,7 +258,7 @@ func TestUpdateRootConfigErrors(t *testing.T) {
258258 rootConfig .Source [k ] = v
259259 }
260260 test .Setup (rootConfig )
261- if err := UpdateRootConfig (rootConfig ); err == nil {
261+ if err := UpdateRootConfig (rootConfig , "" ); err == nil {
262262 t .Errorf ("expected an error with configuration %v" , rootConfig )
263263 t .Fatal (err )
264264 }
0 commit comments