(t *testing.T)
| 268 | } |
| 269 | |
| 270 | func 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 | |
| 290 | func TestDevConfigValidate(t *testing.T) { |
| 291 | t.Parallel() |
nothing calls this directly
no test coverage detected