2024-09-03 18:13:37 +08:00
|
|
|
package mkt
|
|
|
|
|
|
|
|
import (
|
2024-12-17 15:38:16 +08:00
|
|
|
"encoding/json"
|
2024-09-03 18:13:37 +08:00
|
|
|
"fmt"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestSubjectList(t *testing.T) {
|
|
|
|
client, err := NewClient()
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
req := CreateSubjectListRequest(0)
|
|
|
|
req.Port = "9090"
|
|
|
|
list, err := client.SubjectList(req)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
2024-12-17 15:38:16 +08:00
|
|
|
marshal, err := json.Marshal(list.Data)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
fmt.Println(string(marshal))
|
2024-09-03 18:13:37 +08:00
|
|
|
fmt.Println(list.Status, list.Code, list.Msg, list.Data)
|
|
|
|
}
|