Skip to content

Commit 5d472e5

Browse files
committed
test: only run service test when using sudo on linux
1 parent c4bffd0 commit 5d472e5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/_tests/index.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ describe("tunnel", () => {
3131

3232
describe("service", () => {
3333
const TOKEN = process.env.TUNNEL_TOKEN;
34-
if (TOKEN && ["darwin", "linux"].includes(process.platform)) {
34+
if (
35+
TOKEN &&
36+
["darwin", "linux"].includes(process.platform) &&
37+
!(process.platform === "linux" && process.getuid?.() !== 0)
38+
) {
3539
beforeAll(() => {
3640
if (service.exists()) {
3741
service.uninstall();

0 commit comments

Comments
 (0)