forked from arachnys/athenapdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addresses arachnys#188
- Loading branch information
Sam Park
committed
Feb 10, 2019
1 parent
bf3d5d0
commit ae443e6
Showing
7 changed files
with
204 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/stretchr/testify/assert" | ||
"os" | ||
"testing" | ||
) | ||
|
||
func TestNewEnvConfig(t *testing.T) { | ||
t.Run("Datadog Agent Address", func(t *testing.T) { | ||
c := NewEnvConfig() | ||
assert.Equal(t, "", c.DatadogAgentAddress) | ||
|
||
expectValue := "123qweasdzxc:12312" | ||
err := os.Setenv("DATADOG_AGENT_ADDRESS", expectValue) | ||
assert.Nil(t, err) | ||
|
||
c = NewEnvConfig() | ||
assert.Equal(t, expectValue, c.DatadogAgentAddress) | ||
}) | ||
|
||
t.Run("Datadog APM Service Name", func(t *testing.T) { | ||
c := NewEnvConfig() | ||
assert.Equal(t, "weaver", c.DatadogAPMServiceName) | ||
|
||
expectValue := "12o38y27345987234695thekgjr" | ||
err := os.Setenv("DATADOG_APM_SERVICE_NAME", expectValue) | ||
assert.Nil(t, err) | ||
|
||
c = NewEnvConfig() | ||
assert.Equal(t, expectValue, c.DatadogAPMServiceName) | ||
}) | ||
} |
Oops, something went wrong.