(t *testing.T)
| 1571 | } |
| 1572 | |
| 1573 | func TestWorkspaceWithInvalidArchivePathFail(t *testing.T) { |
| 1574 | if runtime.GOOS == "windows" { |
| 1575 | // TODO FUTURE: failing test, fix on windows, there is temp dir clean-up fail, a reference to archive.zip not closed |
| 1576 | t.Skip() |
| 1577 | } |
| 1578 | // The --path flag did not reference a file found in the archive. |
| 1579 | zipDir := createZipFromDir( |
| 1580 | t, |
| 1581 | filepath.Join("testdata", "workspace", "success", "dir"), |
| 1582 | "archive.zip", |
| 1583 | ) |
| 1584 | testRunStdoutStderrNoWarn( |
| 1585 | t, |
| 1586 | nil, |
| 1587 | 1, |
| 1588 | ``, |
| 1589 | `Failure: `+bufmodule.ErrNoTargetProtoFiles.Error(), |
| 1590 | "lint", |
| 1591 | filepath.Join(zipDir, "archive.zip#subdir=proto"), |
| 1592 | "--path", |
| 1593 | filepath.Join("proto", "notexist"), |
| 1594 | ) |
| 1595 | zipDir = createZipFromDir( |
| 1596 | t, |
| 1597 | filepath.Join("testdata", "workspace", "success", "v2", "dir"), |
| 1598 | "archive.zip", |
| 1599 | ) |
| 1600 | testRunStdoutStderrNoWarn( |
| 1601 | t, |
| 1602 | nil, |
| 1603 | 1, |
| 1604 | ``, |
| 1605 | `Failure: `+bufmodule.ErrNoTargetProtoFiles.Error(), |
| 1606 | "lint", |
| 1607 | filepath.Join(zipDir, "archive.zip#subdir=proto"), |
| 1608 | "--path", |
| 1609 | filepath.Join("proto", "notexist"), |
| 1610 | ) |
| 1611 | } |
| 1612 | |
| 1613 | func TestWorkspaceWithInvalidArchiveAbsolutePathFail(t *testing.T) { |
| 1614 | if runtime.GOOS == "windows" { |
nothing calls this directly
no test coverage detected
searching dependent graphs…