diff options
Diffstat (limited to 'internal/hexailsp')
| -rw-r--r-- | internal/hexailsp/run_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/hexailsp/run_test.go b/internal/hexailsp/run_test.go index 2c0fcaf..923f408 100644 --- a/internal/hexailsp/run_test.go +++ b/internal/hexailsp/run_test.go @@ -24,6 +24,10 @@ type fakeServer struct{ func (f *fakeServer) Run() error { f.ran = true; return nil } func TestRunWithFactory_UsesDefaultsAndCallsServer(t *testing.T) { + old := os.Getenv("OPENAI_API_KEY") + t.Cleanup(func(){ _ = os.Setenv("OPENAI_API_KEY", old) }) + _ = os.Setenv("OPENAI_API_KEY", "") + var stderr bytes.Buffer logger := log.New(&stderr, "hexai-lsp ", 0) cfg := appconfig.Load(nil) // defaults |
