summaryrefslogtreecommitdiffstats
path: root/internal/utils/version_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/utils/version_test.go')
-rw-r--r--internal/utils/version_test.go23
1 files changed, 22 insertions, 1 deletions
diff --git a/internal/utils/version_test.go b/internal/utils/version_test.go
index dc1627d..aef3645 100644
--- a/internal/utils/version_test.go
+++ b/internal/utils/version_test.go
@@ -1,6 +1,9 @@
package utils
-import "testing"
+import (
+ "strings"
+ "testing"
+)
func TestIsNewerVersion(t *testing.T) {
tests := []struct {
@@ -50,3 +53,21 @@ func TestIsNewerVersion(t *testing.T) {
})
}
}
+
+func TestGetLatestRemoteTag(t *testing.T) {
+ tag, err := getLatestRemoteTag()
+ if err != nil {
+ t.Skipf("Skipping test: unable to fetch remote tags: %v", err)
+ return
+ }
+
+ if tag == "" {
+ t.Error("Expected non-empty tag, got empty string")
+ }
+
+ if !strings.HasPrefix(tag, "v") {
+ t.Errorf("Expected tag to start with 'v', got: %s", tag)
+ }
+
+ t.Logf("Latest remote tag: %s", tag)
+}