Updated subscription date
Build Docker image on push / docker (push) Successful in 22s
Build and push Docker image on tag / docker (push) Successful in 22s

This commit is contained in:
2026-08-17 21:50:23 +02:00
parent e5a5e6416b
commit f8f9e0c852
4 changed files with 40 additions and 7 deletions
+24
View File
@@ -28,3 +28,27 @@ func TestPveClusterStatusGetClusterModeNumeric(t *testing.T) {
})
}
}
func TestPveSubscriptionGetStatusNumeric(t *testing.T) {
tests := []struct {
status string
want float64
}{
{status: "notfound", want: 0},
{status: "active", want: 1},
{status: "expired", want: 2},
{status: "invalid", want: 2},
{status: "suspended", want: 2},
{status: "new", want: 2},
{status: "unknown", want: 2},
}
for _, tt := range tests {
t.Run(tt.status, func(t *testing.T) {
subscription := PveSubscription{Status: tt.status}
if got := subscription.GetStatusNumeric(); got != tt.want {
t.Fatalf("GetStatusNumeric() = %v, want %v", got, tt.want)
}
})
}
}