refactor backend API structure
This commit is contained in:
1 parent
8a91fef6ab
commit
abc96a37d8
207 files changed
+2675
-1344
No files matched your search
@@ -0,0 +1,20 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestPreloadPowNoOp(t *testing.T) {
|
||||
client := NewClient(nil, nil)
|
||||
if err := client.PreloadPow(context.Background()); err != nil {
|
||||
t.Fatalf("PreloadPow should be no-op, got error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestComputePowUnsupportedAlgorithm(t *testing.T) {
|
||||
_, err := ComputePow(context.Background(), map[string]any{"algorithm": "unknown"})
|
||||
if err == nil {
|
||||
t.Fatal("expected error for unsupported algorithm")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user