Skip to content

Commit

Permalink
test: clear viper settings
Browse files Browse the repository at this point in the history
  • Loading branch information
PhearZero committed Nov 5, 2024
1 parent a12872d commit 0f3cbb7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ func Test_InitConfig(t *testing.T) {

func Test_InitConfigWithoutEndpoint(t *testing.T) {
cwd, _ := os.Getwd()
viper.Set("token", "")
viper.Set("server", "")
t.Setenv("ALGORAND_DATA", cwd+"/testdata/Test_InitConfigWithoutEndpoint")

initConfig()
Expand All @@ -51,6 +53,8 @@ func Test_InitConfigWithoutEndpoint(t *testing.T) {

func Test_InitConfigWithAddress(t *testing.T) {
cwd, _ := os.Getwd()
viper.Set("token", "")
viper.Set("server", "")
t.Setenv("ALGORAND_DATA", cwd+"/testdata/Test_InitConfigWithAddress")

initConfig()
Expand All @@ -65,6 +69,8 @@ func Test_InitConfigWithAddress(t *testing.T) {

func Test_InitConfigWithAddressAndDefaultPort(t *testing.T) {
cwd, _ := os.Getwd()
viper.Set("token", "")
viper.Set("server", "")
t.Setenv("ALGORAND_DATA", cwd+"/testdata/Test_InitConfigWithAddressAndDefaultPort")

initConfig()
Expand Down

0 comments on commit 0f3cbb7

Please sign in to comment.