-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated go mod file and added test cases
- Loading branch information
s0s01qp
committed
Jul 19, 2021
1 parent
54b6f65
commit 96cc755
Showing
5 changed files
with
28 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package core_test | ||
|
||
import ( | ||
"github.com/sinhashubham95/go-actuator/commons" | ||
"github.com/sinhashubham95/go-actuator/core" | ||
"github.com/stretchr/testify/assert" | ||
"os" | ||
"testing" | ||
) | ||
|
||
func TestGetEnvironmentVariables(t *testing.T) { | ||
_ = os.Setenv("key1", "value1") | ||
_ = os.Setenv("key2", "value2") | ||
environ := core.GetEnvironmentVariables() | ||
assert.Equal(t, "value1", environ["key1"]) | ||
assert.Equal(t, "value2", environ["key2"]) | ||
assert.Equal(t, commons.EnvDefaultValue, environ[commons.Env]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package core_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters