feat: sync official star gift lifecycle tooling
Sync telesrv 4c0e2d9 (feat: complete official star gift lifecycle and admin tooling). Public adjustments: skipped private docs/deploy-nginx/README source changes, kept iamxvbaba/td public dependency, replaced local/private sample IP and orange seed label.
This commit is contained in:
parent
f2c2fd0236
commit
14bf7d1e20
92 changed files with 14768 additions and 727 deletions
|
|
@ -519,6 +519,19 @@ func TestLoadRejectsNonTelesrvConfigKeys(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestValidateStarGiftConfigRejectsNegativeInternalTONGrant(t *testing.T) {
|
||||
cfg := Config{
|
||||
StarGiftSweepInterval: time.Second,
|
||||
StarGiftSweepBatch: 1,
|
||||
StarGiftTONStartingGrant: -1,
|
||||
StarGiftStarsProceedsPermille: 1000,
|
||||
StarGiftTONProceedsPermille: 1000,
|
||||
}
|
||||
if err := validateStarGiftConfig(cfg); err == nil {
|
||||
t.Fatal("negative internal TON starting grant was accepted")
|
||||
}
|
||||
}
|
||||
|
||||
func writeConfigFile(t *testing.T, path, body string) {
|
||||
t.Helper()
|
||||
if err := os.WriteFile(path, []byte(body), 0o600); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue