MCPcopy Index your code
hub / github.com/coder/coder / TestDevelopInCoder

Function TestDevelopInCoder

scripts/develop/main_test.go:270–288  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

268}
269
270func TestDevelopInCoder(t *testing.T) {
271 t.Run("DEVELOP_IN_CODER", func(t *testing.T) {
272 t.Setenv("DEVELOP_IN_CODER", "1")
273 t.Setenv("CODER_AGENT_URL", "")
274 assert.True(t, developInCoder())
275 })
276
277 t.Run("CODER_AGENT_URL", func(t *testing.T) {
278 t.Setenv("DEVELOP_IN_CODER", "")
279 t.Setenv("CODER_AGENT_URL", "http://something")
280 assert.True(t, developInCoder())
281 })
282
283 t.Run("Neither", func(t *testing.T) {
284 t.Setenv("DEVELOP_IN_CODER", "")
285 t.Setenv("CODER_AGENT_URL", "")
286 assert.False(t, developInCoder())
287 })
288}
289
290func TestDevConfigValidate(t *testing.T) {
291 t.Parallel()

Callers

nothing calls this directly

Calls 3

developInCoderFunction · 0.85
SetenvMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected