File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ func (c *Config) Save(configPath string) error {
5757func GetConfig (scwrcPath string ) (* Config , error ) {
5858 var err error
5959
60- orgid := os .Getenv ("SCW_API_ORGID " )
61- token := os .Getenv ("SCW_API_TOKEN " )
60+ orgid := os .Getenv ("SCW_ORGANIZATION " )
61+ token := os .Getenv ("SCW_TOKEN " )
6262 if token != "" && orgid != "" {
6363 cfg := Config {
6464 Organization : strings .Trim (orgid , "\n " ),
Original file line number Diff line number Diff line change @@ -58,14 +58,14 @@ func TestGetConfig(t *testing.T) {
5858 So (err , ShouldBeNil )
5959 So (cfg .Organization , ShouldEqual , randOrg )
6060 So (cfg .Token , ShouldEqual , randToken )
61- os .Setenv ("SCW_API_ORGID " , randOrg )
62- os .Setenv ("SCW_API_TOKEN " , randToken )
61+ os .Setenv ("SCW_ORGANIZATION " , randOrg )
62+ os .Setenv ("SCW_TOKEN " , randToken )
6363 cfg , err = GetConfig ("" )
6464 So (err , ShouldBeNil )
6565 So (cfg .Organization , ShouldEqual , randOrg )
6666 So (cfg .Token , ShouldEqual , randToken )
67- os .Unsetenv ("SCW_API_ORGID " )
68- os .Unsetenv ("SCW_API_TOKEN " )
67+ os .Unsetenv ("SCW_ORGANIZATION " )
68+ os .Unsetenv ("SCW_TOKEN " )
6969 })
7070}
7171
You can’t perform that action at this time.
0 commit comments