MCPcopy Create free account
hub / github.com/cli/cli / TestConfigReadsEnvironment

Function TestConfigReadsEnvironment

internal/debug/config_enabled_test.go:14–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestConfigReadsEnvironment(t *testing.T) {
15 t.Setenv("GH_INTERNAL_AT_EXPIRES_IN", "90")
16 t.Setenv("GH_INTERNAL_RT_EXPIRES_IN", "120")
17 t.Setenv("GH_INTERNAL_DEBUG_REFRESH_TOKEN", "true")
18
19 assert.Equal(t, debug.DebugConfig{
20 AccessTokenExpiresIn: o.Some(90 * time.Second),
21 RefreshTokenExpiresIn: o.Some(120 * time.Second),
22 VerboseTokenRefresh: o.Some(true),
23 }, debug.Config())
24}

Callers

nothing calls this directly

Calls 2

ConfigFunction · 0.92
EqualMethod · 0.80

Tested by

no test coverage detected