(t *testing.T)
| 13 | ) |
| 14 | |
| 15 | func TestGetConfigDetails(t *testing.T) { |
| 16 | content := ` |
| 17 | version: "3.0" |
| 18 | services: |
| 19 | foo: |
| 20 | image: alpine:3.5 |
| 21 | ` |
| 22 | file := fs.NewFile(t, "test-get-config-details", fs.WithContent(content)) |
| 23 | defer file.Remove() |
| 24 | |
| 25 | details, err := getConfigDetails([]string{file.Path()}, nil) |
| 26 | assert.NilError(t, err) |
| 27 | assert.Check(t, is.Equal(filepath.Dir(file.Path()), details.WorkingDir)) |
| 28 | assert.Assert(t, is.Len(details.ConfigFiles, 1)) |
| 29 | assert.Check(t, is.Equal("3.0", details.ConfigFiles[0].Config["version"])) |
| 30 | assert.Check(t, is.Len(details.Environment, len(os.Environ()))) |
| 31 | } |
| 32 | |
| 33 | func TestGetConfigDetailsStdin(t *testing.T) { |
| 34 | content := ` |
nothing calls this directly
no test coverage detected
searching dependent graphs…