From feea3eb9aa3a3be6790ece19d846408589b49cdb Mon Sep 17 00:00:00 2001 From: Tyler Jang Date: Thu, 30 May 2024 12:41:21 -0700 Subject: [PATCH] fix tests --- tools/diff-so-fancy/diff_so_fancy.test.ts | 2 +- tools/yq/plugin.yaml | 9 ++++++--- tools/yq/yq.test.ts | 7 +++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tools/diff-so-fancy/diff_so_fancy.test.ts b/tools/diff-so-fancy/diff_so_fancy.test.ts index f91d9d6cb..35d14f95f 100644 --- a/tools/diff-so-fancy/diff_so_fancy.test.ts +++ b/tools/diff-so-fancy/diff_so_fancy.test.ts @@ -20,7 +20,7 @@ toolTest({ testConfigs: [ makeToolTestConfig({ command: ["diff-so-fancy"], - expectedExitCode: 0, + expectedExitCode: 25, expectedOut: "modified:", stdin: sampleDiff, }), diff --git a/tools/yq/plugin.yaml b/tools/yq/plugin.yaml index 79c05943c..f3519367a 100644 --- a/tools/yq/plugin.yaml +++ b/tools/yq/plugin.yaml @@ -8,16 +8,19 @@ downloads: cpu: x86_64: 386 arm_64: arm64 - url: https://github.com/mikefarah/yq/releases/download/v${version}/yq_${os}_${cpu}.tar.gz + url: https://github.com/mikefarah/yq/releases/download/v${version}/yq_${os}_${cpu} - os: windows: windows cpu: x86_64: 386 arm_64: arm64 - url: https://github.com/mikefarah/yq/releases/download/v${version}/yq_${os}_${cpu}.zip + url: https://github.com/mikefarah/yq/releases/download/v${version}/yq_${os}_${cpu}.exe tools: definitions: - name: yq download: yq - known_good_version: 4.40.5 + known_good_version: 4.44.1 shims: [yq] + health_checks: + - command: yq --version + parse_regex: version v${semver} diff --git a/tools/yq/yq.test.ts b/tools/yq/yq.test.ts index bd76b3a14..c256e557a 100644 --- a/tools/yq/yq.test.ts +++ b/tools/yq/yq.test.ts @@ -1,8 +1,7 @@ -import { makeToolTestConfig, toolTest } from "tests"; +import { toolInstallTest } from "tests"; // The binary name varies by platform so we can't roll this into a health_check as-is. -toolTest({ +toolInstallTest({ toolName: "yq", - toolVersion: "4.40.5", - testConfigs: [makeToolTestConfig({ command: ["yq", "--version"], expectedOut: "v4.40.5" })], + toolVersion: "4.44.1", });