Skip to content

Commit

Permalink
tiny fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrofolium committed Sep 19, 2023
1 parent 5e1116d commit c46f053
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion cardinal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ func main() {
world.StartGameLoop(context.Background(), time.Second)

// TODO: When launching to production, you should enable signature verification.
//h, err := server.NewHandler(world, server.WithPort(cfg.CardinalPort), server.DisableSignatureVerification())
fmt.Println("Serving Cardinal at: ", cfg.CardinalPort)
h, err := server.NewHandler(world, server.WithPort(cfg.CardinalPort), server.DisableSignatureVerification())
if err != nil {
Expand Down
4 changes: 1 addition & 3 deletions nakama/cardinal.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ import (
)

var (
listEndpoints = "query/http/endpoints"
//listTxEndpointsEndpoint = "list/tx-endpoints"
//listReadEndpoints = "list/read-endpoints"
listEndpoints = "query/http/endpoints"
createPersonaEndpoint = "tx/persona/create-persona"
readPersonaSignerEndpoint = "query/persona/signer"
transactionReceiptsEndpoint = "query/receipts/list"
Expand Down
5 changes: 3 additions & 2 deletions testsuite/testsuite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
)

func TestTransactionAndCQLAndRead(t *testing.T) {

//Test persona
privateKey, err := crypto.GenerateKey()
assert.NilError(t, err)
signerAddr := crypto.PubkeyToAddress(privateKey.PublicKey).Hex()
Expand All @@ -36,7 +38,6 @@ func TestTransactionAndCQLAndRead(t *testing.T) {
assert.NilError(t, waitForAcceptedPersonaTag(c))
type CreatePlayerTxMsg struct{ Nickname string }
payload := CreatePlayerTxMsg{"Bob"}
//signedPayload, err := sign.NewSignedPayload(privateKey, personaTag, "world", 100, payload)
resp, err = c.rpc("tx/game/create-player", payload)
assert.NilError(t, err)
body := copyBody(resp)
Expand All @@ -59,7 +60,6 @@ func TestTransactionAndCQLAndRead(t *testing.T) {
CQL string `json:CQL`
}{"CONTAINS(Player)"})
assert.NilError(t, err)
//fmt.Println(copyBody(resp))
assert.Equal(t, 200, resp.StatusCode)
results, err := io.ReadAll(resp.Body)

Expand All @@ -80,6 +80,7 @@ func TestTransactionAndCQLAndRead(t *testing.T) {
}
}

//Test Read
type ConstantRequest struct {
Label string `json:"label"`
}
Expand Down
1 change: 0 additions & 1 deletion testsuite/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ type nakamaClient struct {

func newClient(t *testing.T) *nakamaClient {
host := os.Getenv(envNakamaAddress)
//assert.Check(t, host != "", "nakama address must be set via environment variable %s", envNakamaAddress)
if host == "" {
host = "http://127.0.0.1:7350"
}
Expand Down

0 comments on commit c46f053

Please sign in to comment.