MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / TestMissingVariable

Function TestMissingVariable

env/desc_test.go:23–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21}
22
23func TestMissingVariable(t *testing.T) {
24 desc := env.Int("TEST_INT_MISSING")
25 result := 123 // existing value
26 err := desc.Parse(&result)
27
28 require.NoError(t, err)
29 assert.Equal(t, 123, result) // value should not change
30}
31
32func TestEmptyValue(t *testing.T) {
33 t.Setenv("TEST_INT", "")

Callers

nothing calls this directly

Calls 2

IntFunction · 0.92
ParseMethod · 0.80

Tested by

no test coverage detected