From e17d713b265a91d7388228da29a72e4f59756e22 Mon Sep 17 00:00:00 2001 From: George Kontridze Date: Sat, 21 Sep 2024 14:34:48 -0700 Subject: [PATCH] fix: error messages and run all tests (#381) Fixes scripts for running go tests and git tests --- cmd/app/git/git_test.go | 4 ++-- makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/app/git/git_test.go b/cmd/app/git/git_test.go index e8864fb2..c2f88045 100644 --- a/cmd/app/git/git_test.go +++ b/cmd/app/git/git_test.go @@ -198,7 +198,7 @@ func TestExtractGitInfo_FailToGetProjectRemoteUrl(t *testing.T) { tC := FailTestCase{ desc: "Error returned by function to get the project remote url", errMsg: "Some error", - expectedErr: "Could not get project Url: Some error", + expectedErr: "could not get project Url: Some error", } t.Run(tC.desc, func(t *testing.T) { g := failingUrlManager{ @@ -227,7 +227,7 @@ func TestExtractGitInfo_FailToGetCurrentBranchName(t *testing.T) { tC := FailTestCase{ desc: "Error returned by function to get the project remote url", errMsg: "Some error", - expectedErr: "Failed to get current branch: Some error", + expectedErr: "failed to get current branch: Some error", } t.Run(tC.desc, func(t *testing.T) { g := failingBranchManager{ diff --git a/makefile b/makefile index 83e9c65f..151ce822 100644 --- a/makefile +++ b/makefile @@ -4,10 +4,10 @@ PROJECTNAME=$(shell basename "$(PWD)") ## compile: build golang project compile: - @cd cmd && go build -o bin && mv bin ../bin + @go build -o bin ./cmd ## test: run golang project tests test: - @cd cmd/app && go test + @go test -v ./... .PHONY: help all: help