Skip to content

Commit

Permalink
fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Donghong Huang committed Mar 10, 2021
1 parent 369e1fb commit c8f6294
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/util/file_handler_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package util

import (
"os"
"testing"

"github.com/stretchr/testify/assert"
Expand All @@ -17,6 +18,7 @@ e:
nameber: ${NAME||10}
- ${TEST||none}
`)
os.Setenv("NAME", "go-archaius")
m, err := Convert2JavaProps("test.yaml", b)
assert.NoError(t, err)
assert.Equal(t, m["c.d"], 3)
Expand All @@ -27,7 +29,7 @@ e:
map1, ok1 := v[0].(map[string]interface{})
assert.True(t, ok1)
assert.Equal(t, "addvalue", map1["addr"])
assert.Equal(t, "10", map1["nameber"])
assert.Equal(t, "go-archaius", map1["nameber"])
assert.Equal(t, "none", v[1])
}

Expand Down

0 comments on commit c8f6294

Please sign in to comment.