Skip to content

Commit 67830ed

Browse files
authored
Disable buf-breaking tests (#169)
Buf-breaking tests and the config itself are currently in a semi-broken state. We will need to fix this and re-enable the tests. For now, just disable it.
1 parent 231686d commit 67830ed

1 file changed

Lines changed: 22 additions & 21 deletions

File tree

linters/buf/buf.test.ts

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
import * as path from "path";
1+
// import * as path from "path";
22
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";
55

66
// 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);
1111

12-
const newContents = `
13-
syntax = "proto3";
12+
// const newContents = `
13+
// syntax = "proto3";
1414

15-
package trunk;
15+
// package trunk;
1616

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+
// `;
2323

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+
// };
2828

2929
// TODO(Tyler): We will eventually need to add a couple more test cases involving failure modes and more coverage for format.
3030
linterCheckTest({ linterName: "buf-lint", namedTestPrefixes: ["buf_lint"] });
3131
linterFmtTest({ linterName: "buf-format", namedTestPrefixes: ["buf_lint"] });
3232

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

Comments
 (0)