Skip to content

Commit

Permalink
Merge pull request #663 from joereuss12/fix-main-test-version-branch
Browse files Browse the repository at this point in the history
Main test now restores current version
  • Loading branch information
haoming29 authored Jan 16, 2024
2 parents 3caae35 + d29ec5a commit f93a9ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
)

func TestHandleCLIVersionFlag(t *testing.T) {
// Save the current version to reset this variable
var currentVersion = version
version = "0.0.1"
date = "2023-10-06T15:26:50Z"
commit = "f0f94a3edf6641c2472345819a0d5453fc9e68d1"
Expand Down Expand Up @@ -100,6 +102,9 @@ func TestHandleCLIVersionFlag(t *testing.T) {

// Restore the args back when test finished
os.Args = oldArgs

// Set the version back to what it was
version = currentVersion
}

func TestHandleCLIExecutableAlias(t *testing.T) {
Expand Down

0 comments on commit f93a9ca

Please sign in to comment.