(t *testing.T)
| 274 | } |
| 275 | |
| 276 | func TestProjectWithDotEnv(t *testing.T) { |
| 277 | wd, err := os.Getwd() |
| 278 | assert.NilError(t, err) |
| 279 | err = os.Chdir("testdata/simple") |
| 280 | assert.NilError(t, err) |
| 281 | defer os.Chdir(wd) //nolint:errcheck |
| 282 | |
| 283 | opts, err := NewProjectOptions([]string{ |
| 284 | "compose-with-variables.yaml", |
| 285 | }, WithName("my_project"), WithEnvFiles(), WithDotEnv) |
| 286 | assert.NilError(t, err) |
| 287 | p, err := ProjectFromOptions(context.TODO(), opts) |
| 288 | assert.NilError(t, err) |
| 289 | service, err := p.GetService("simple") |
| 290 | assert.NilError(t, err) |
| 291 | assert.Equal(t, service.Ports[0].Published, "8000") |
| 292 | } |
| 293 | |
| 294 | func TestProjectWithDiscardEnvFile(t *testing.T) { |
| 295 | opts, err := NewProjectOptions([]string{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…