Return subscription from channel-preview [skip-tests]
All checks were successful
Build Docker and Deploy / Run Unit-Tests (push) Has been skipped
Build Docker and Deploy / Build Docker Container (push) Successful in 46s
Build Docker and Deploy / Deploy to Server (push) Successful in 6s

This commit is contained in:
2025-04-12 23:37:06 +02:00
parent 301240b896
commit c0b8a8a3f4
6 changed files with 217 additions and 6 deletions

View File

@@ -306,6 +306,22 @@ func AssertAny(v any) {
// used to prevent golang "unused variable error"
}
func AssertNil(t *testing.T, key string, v any) {
if v != nil {
t.Errorf("AssertNil(%s) failed - actual value:\n%+v", key, v)
t.Error(string(debug.Stack()))
t.FailNow()
}
}
func AssertNotNil(t *testing.T, key string, v any) {
if v == nil {
t.Errorf("AssertNotNil(%s) failed", key)
t.Error(string(debug.Stack()))
t.FailNow()
}
}
func unpointer(v any) any {
if v == nil {
return v