feat(all): add verified gacha flows and native client studio
This commit is contained in:
@@ -27,7 +27,7 @@ type RegularSeason struct {
|
||||
Season uint64
|
||||
}
|
||||
|
||||
// Service contains the official 2.34.13 calendar active for this fixed
|
||||
// Service contains the configured regular-content calendar for this fixed
|
||||
// client/GameData version. It is server configuration, not a captured packet:
|
||||
// Handle encodes every protobuf field from these named values.
|
||||
type Service struct {
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package schedule
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"bd2server/internal/server/wire"
|
||||
)
|
||||
|
||||
func TestVersion23413ContainsRequiredContentSix(t *testing.T) {
|
||||
func TestVersion23510ContainsRequiredContentSix(t *testing.T) {
|
||||
service := Current()
|
||||
code, response, handled, err := service.Handle("/ScheduleInfo", wire.AppendVarint(nil, 1, 1))
|
||||
if err != nil || !handled || code != 117 {
|
||||
@@ -33,21 +31,6 @@ func TestVersion23413ContainsRequiredContentSix(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestVersion23413MatchesOptionalOfficialResponse(t *testing.T) {
|
||||
path := os.Getenv("BD2_TEST_SCHEDULE_CAPTURE")
|
||||
if path == "" {
|
||||
t.Skip("set BD2_TEST_SCHEDULE_CAPTURE to compare an official response")
|
||||
}
|
||||
want, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
t.Skipf("optional official schedule sample unavailable: %v", err)
|
||||
}
|
||||
_, got, _, err := Current().Handle("/ScheduleInfo", wire.AppendVarint(nil, 1, 2))
|
||||
if err != nil || !bytes.Equal(got, want) {
|
||||
t.Fatalf("schedule differs from official 2.34.13 response: equal=%v err=%v\ngot=%x\nwant=%x", bytes.Equal(got, want), err, got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestScheduleRejectsMissingSequence(t *testing.T) {
|
||||
if _, _, handled, err := Current().Handle("/ScheduleInfo", nil); !handled || err == nil {
|
||||
t.Fatalf("missing sequence handled=%v err=%v", handled, err)
|
||||
|
||||
Reference in New Issue
Block a user