Skip to content

Commit 2529168

Browse files
fix: Update GitHub Actions, tests and Go versions (#29)
* docs: update docs * fix: test flow * fix: Update GitHub Actions workflow vserion and Go versions to 1.22 * fix: Update CLI version to v1.8.1
1 parent 1b72d0c commit 2529168

17 files changed

+43
-41
lines changed

.github/workflows/ci.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout Code
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
- name: Setup Go
18-
uses: actions/setup-go@v4
18+
uses: actions/setup-go@v5
1919
with:
20-
go-version: 1.19
20+
go-version: 1.22
2121
- name: Build
2222
run: go build -v ./...
2323
- name: Format
@@ -28,11 +28,11 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- name: Checkout Code
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3232
- name: Setup Go
33-
uses: actions/setup-go@v4
33+
uses: actions/setup-go@v5
3434
with:
35-
go-version: 1.19
35+
go-version: 1.22
3636
cache: false
3737
- name: GolangCI-Lint Check
38-
uses: golangci/golangci-lint-action@v3
38+
uses: golangci/golangci-lint-action@v6

.github/workflows/greetings.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ on:
1515

1616
jobs:
1717
welcome:
18+
if: github.actor != 'Pradumnasaraf'
1819
name: Welcome Step
1920
runs-on: ubuntu-latest
2021
steps:
21-
- uses: actions/checkout@v1
22+
- uses: actions/checkout@v4
2223
- uses: EddieHubCommunity/gh-action-community/src/welcome@main
2324
with:
2425
github-token: ${{ secrets.github_token }}

.github/workflows/releases.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout the repo
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Creating Changelog and Release
1616
id: changelog
17-
uses: TriPSs/conventional-changelog-action@v3
17+
uses: TriPSs/conventional-changelog-action@v5
1818
with:
1919
github-token: ${{ secrets.PA_TOKEN }}
2020
output-file: "false"
@@ -32,12 +32,12 @@ jobs:
3232
steps:
3333

3434
- name: Checkout the repo
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3636
with:
3737
fetch-depth: 0
3838

3939
- name: Set up Go
40-
uses: actions/setup-go@v4
40+
uses: actions/setup-go@v5
4141

4242
- name: Run GoReleaser
4343
uses: goreleaser/goreleaser-action@v4

.github/workflows/unit-test.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Code
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616

1717
- name: Setup Go
18-
uses: actions/setup-go@v4
18+
uses: actions/setup-go@v5
1919
with:
20-
go-version: 1.19
20+
go-version: 1.22
21+
22+
- name: Build Executable
23+
run: go build -o ./tests/candy
2124

2225
- name: Clear the test cache
2326
run: go clean -testcache

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ Available Commands:
4444
YTJ Converts a YAML into JSON.
4545
docker Docker related commands. Like generating a Dockerfile for a language.
4646
encode It encodes and decodes a string to base64 and vice versa.
47+
help Help about any command
4748
k8s Kubernetes related commands. Like generating manifest files for kubernetes objects.
49+
update Update candy to the latest version
50+
version Know the installed version of candy
4851
```
4952

5053
For detailed usage of each command, visit [here](https://pradumnasaraf.github.io/candy/)

cmd/root.go

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
var rootCmd = &cobra.Command{
1414
Use: "candy [command]",
1515
Short: "Do all your tedious tasks with a single command",
16-
1716
Run: func(cmd *cobra.Command, args []string) {
1817
err := cmd.Help()
1918
checkNilErr(err)

cmd/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/spf13/cobra"
77
)
88

9-
const CliVersion = "v1.8.0"
9+
const CliVersion = "v1.8.1"
1010

1111
// versionCmd represents the version command
1212
var versionCmd = &cobra.Command{

go.mod

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
module github.com/Pradumnasaraf/candy
22

3-
go 1.20
3+
go 1.22
44

55
require (
66
github.com/docker/docker v24.0.2+incompatible
77
github.com/manifoldco/promptui v0.9.0
88
github.com/spf13/cobra v1.6.1
99
github.com/spf13/viper v1.15.0
10-
github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e
1110
)
1211

1312
require (
@@ -18,9 +17,6 @@ require (
1817
github.com/docker/go-units v0.5.0 // indirect
1918
github.com/fsnotify/fsnotify v1.6.0 // indirect
2019
github.com/gogo/protobuf v1.3.2 // indirect
21-
github.com/google/go-github v17.0.0+incompatible // indirect
22-
github.com/google/go-querystring v1.1.0 // indirect
23-
github.com/hashicorp/go-version v1.6.0 // indirect
2420
github.com/hashicorp/hcl v1.0.0 // indirect
2521
github.com/inconshreveable/mousetrap v1.0.1 // indirect
2622
github.com/magiconair/properties v1.8.7 // indirect

go.sum

+8-8
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
3737
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
3838
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
3939
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
40+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
4041
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
4142
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
4243
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
@@ -71,6 +72,7 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
7172
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
7273
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
7374
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
75+
github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps=
7476
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
7577
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
7678
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -116,10 +118,7 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
116118
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
117119
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
118120
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
119-
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
120-
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
121-
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
122-
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
121+
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
123122
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
124123
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
125124
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -138,8 +137,6 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
138137
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
139138
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
140139
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
141-
github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
142-
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
143140
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
144141
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
145142
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
@@ -155,9 +152,11 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
155152
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
156153
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
157154
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
155+
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
158156
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
159157
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
160158
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
159+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
161160
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
162161
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
163162
github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA=
@@ -182,6 +181,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
182181
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
183182
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
184183
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
184+
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
185185
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
186186
github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk=
187187
github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
@@ -208,8 +208,6 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs
208208
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
209209
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
210210
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
211-
github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e h1:IWllFTiDjjLIf2oeKxpIUmtiDV5sn71VgeQgg6vcE7k=
212-
github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e/go.mod h1:d7u6HkTYKSv5m6MCKkOQlHwaShTMl3HjqSGW3XtVhXM=
213211
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
214212
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
215213
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -315,6 +313,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
315313
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
316314
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
317315
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
316+
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
318317
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
319318
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
320319
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -366,6 +365,7 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb
366365
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
367366
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
368367
golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA=
368+
golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
369369
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
370370
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
371371
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=

tests/docker/docker_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
func TestDockerCmd(t *testing.T) {
1111

1212
expectedOutput := "Docker related commands."
13-
cmd := exec.Command("candy", "docker")
13+
cmd := exec.Command("./../candy", "docker")
1414

1515
// Capture the output
1616
output, err := cmd.CombinedOutput()

tests/encode_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
func TestEncodeCmd(t *testing.T) {
1212

1313
stringToEncode := "password"
14-
cmd := exec.Command("candy", "encode", stringToEncode)
14+
cmd := exec.Command("./candy", "encode", stringToEncode)
1515

1616
// Capture the output
1717
output, err := cmd.CombinedOutput()

tests/jsonToYaml_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
// TestJsonToYamlCmd tests the JTY command
1010
func TestJsonToYamlCmd(t *testing.T) {
1111

12-
cmd := exec.Command("candy", "JTY", "-f", "testdata/JTY.json")
12+
cmd := exec.Command("./candy", "JTY", "-f", "testdata/JTY.json")
1313

1414
// Capture the output
1515
output, err := cmd.CombinedOutput()

tests/keyValueToJson_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
// TestKeyValueToJson tests the KVTJ command
1010
func TestKeyValueToJson(t *testing.T) {
1111

12-
cmd := exec.Command("candy", "KVTJ", "-f", "testdata/env")
12+
cmd := exec.Command("./candy", "KVTJ", "-f", "testdata/env")
1313

1414
// Capture the output
1515
output, err := cmd.CombinedOutput()

tests/kubernetes/kubernetes_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
func TestKubernetesCmd(t *testing.T) {
1111

1212
expectedOutput := "Kubernetes related commands."
13-
cmd := exec.Command("candy", "k8s")
13+
cmd := exec.Command("./../candy", "k8s")
1414

1515
// Capture the output
1616
output, err := cmd.CombinedOutput()

tests/root_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
func TestRootCmd(t *testing.T) {
1111

1212
expectedOutput := "Do all your tedious tasks with a single command"
13-
cmd := exec.Command("candy")
13+
cmd := exec.Command("./candy")
1414

1515
// Capture the output
1616
output, err := cmd.CombinedOutput()

tests/version_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
// TestVersionCmd tests the version command
1010
func TestVersionCmd(t *testing.T) {
1111

12-
expectedOutput := "1."
13-
cmd := exec.Command("candy", "version")
12+
expectedOutput := "candy version"
13+
cmd := exec.Command("./candy", "version")
1414

1515
// Capture the output
1616
output, err := cmd.CombinedOutput()
@@ -19,10 +19,10 @@ func TestVersionCmd(t *testing.T) {
1919
}
2020

2121
// Validate the cli output
22-
got := string(output)[:5]
22+
got := string(output)[:13]
2323

2424
if !strings.Contains(got, expectedOutput) {
25-
t.Errorf("expected the version to start with %v, but got: %v", expectedOutput, got)
25+
t.Errorf("expected %v, but got: %v", expectedOutput, got)
2626
}
2727

2828
}

tests/yamlToJson_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
func TestYamlToJsonCmd(t *testing.T) {
1111

1212
// Execute the yamlToJson command
13-
cmd := exec.Command("candy", "YTJ", "-f", "testdata/YTJ.yaml")
13+
cmd := exec.Command("./candy", "YTJ", "-f", "testdata/YTJ.yaml")
1414

1515
// Capture the output
1616
output, err := cmd.CombinedOutput()

0 commit comments

Comments
 (0)