Skip to content

Commit 435f92b

Browse files
committed
log/rollbar: Also test for ENV/EQUINIX_ENV and VERSION/EQUINIX_VERSION
This should have been added back in the original PR :(.
1 parent ccb1b1b commit 435f92b

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

log/log_test.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,12 @@ func TestInit(t *testing.T) {
193193
t.Run("RollbarMissingVersionPanics", func(t *testing.T) {
194194
// ensure Init fails if none of the *ENV vars are set
195195
// we need one of VERSION to exist
196-
os.Setenv("PACKET_VERSION", "VERSION")
197-
defer os.Unsetenv("PACKET_VERSION")
196+
os.Setenv("VERSION", "VERSION")
197+
defer os.Unsetenv("VERSION")
198198

199199
for _, env := range []string{
200+
"ENV",
201+
"EQUINIX_ENV",
200202
"PACKET_ENV",
201203
} {
202204
t.Run(env, func(t *testing.T) {
@@ -214,10 +216,12 @@ func TestInit(t *testing.T) {
214216
t.Run("RollbarMissingVersionPanics", func(t *testing.T) {
215217
// ensure Init fails if none of the *VERSION vars are set
216218
// we need one of ENV to exist
217-
os.Setenv("PACKET_ENV", "ENV")
218-
defer os.Unsetenv("PACKET_ENV")
219+
os.Setenv("ENV", "ENV")
220+
defer os.Unsetenv("ENV")
219221

220222
for _, env := range []string{
223+
"VERSION",
224+
"EQUINIX_VERSION",
221225
"PACKET_VERSION",
222226
} {
223227
t.Run(env, func(t *testing.T) {

0 commit comments

Comments
 (0)