|
1 | | -import * as path from "path"; |
| 1 | +// import * as path from "path"; |
2 | 2 | import { linterCheckTest, linterFmtTest } from "tests"; |
3 | | -import { TrunkDriver } from "tests/driver"; |
4 | | -import { TEST_DATA } from "tests/utils"; |
| 3 | +// import { TrunkDriver } from "tests/driver"; |
| 4 | +// import { TEST_DATA } from "tests/utils"; |
5 | 5 |
|
6 | 6 | // buf-breaking detects breaking changes to proto files by using git-awareness |
7 | | -const preCheck = async (driver: TrunkDriver) => { |
8 | | - if (driver.gitDriver) { |
9 | | - const inputName = "buf_breaking.in.proto"; |
10 | | - const inputPath = path.join(TEST_DATA, inputName); |
| 7 | +// const preCheck = async (driver: TrunkDriver) => { |
| 8 | +// if (driver.gitDriver) { |
| 9 | +// const inputName = "buf_breaking.in.proto"; |
| 10 | +// const inputPath = path.join(TEST_DATA, inputName); |
11 | 11 |
|
12 | | - const newContents = ` |
13 | | - syntax = "proto3"; |
| 12 | +// const newContents = ` |
| 13 | +// syntax = "proto3"; |
14 | 14 |
|
15 | | - package trunk; |
| 15 | +// package trunk; |
16 | 16 |
|
17 | | - // Change the types of these fields (breaking change) |
18 | | - message HelloWorld { |
19 | | - int32 hello = 1; |
20 | | - int32 world = 2; |
21 | | - } |
22 | | - `; |
| 17 | +// // Change the types of these fields (breaking change) |
| 18 | +// message HelloWorld { |
| 19 | +// int32 hello = 1; |
| 20 | +// int32 world = 2; |
| 21 | +// } |
| 22 | +// `; |
23 | 23 |
|
24 | | - await driver.gitDriver.add(inputPath).commit("Committed original version"); |
25 | | - driver.writeFile(inputPath, newContents); |
26 | | - } |
27 | | -}; |
| 24 | +// await driver.gitDriver.add(inputPath).commit("Committed original version"); |
| 25 | +// driver.writeFile(inputPath, newContents); |
| 26 | +// } |
| 27 | +// }; |
28 | 28 |
|
29 | 29 | // TODO(Tyler): We will eventually need to add a couple more test cases involving failure modes and more coverage for format. |
30 | 30 | linterCheckTest({ linterName: "buf-lint", namedTestPrefixes: ["buf_lint"] }); |
31 | 31 | linterFmtTest({ linterName: "buf-format", namedTestPrefixes: ["buf_lint"] }); |
32 | 32 |
|
33 | | -linterCheckTest({ linterName: "buf-breaking", namedTestPrefixes: ["buf_breaking"], preCheck }); |
| 33 | +// TODO(Tyler): Buf-breaking tests and the config itself are currently in a semi-broken state. Need to fix and re-enable. |
| 34 | +// linterCheckTest({ linterName: "buf-breaking", namedTestPrefixes: ["buf_breaking"], preCheck }); |
0 commit comments