Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(starter-game-template): Make template use new swagger routes and various other changes #11

Merged
merged 8 commits into from
Sep 20, 2023

Conversation

pyrofolium
Copy link
Contributor

@pyrofolium pyrofolium commented Sep 19, 2023

Closes#: World-316

Change log

Sorry this one is kind of big. Will comment to make things clear:

  • Adds new DockerFile and docker-compose.yml to trigger cardinal starting up in debug mode under docker-compose
  • Added new mage command mage startDebug that does everything mage start does except cardinal is running in debug mode. (note you will have to attach a debugger to port 4000 for the server to run)
  • Added a new goland run configuration for attaching debugger. Run mage startDebug then execute the run configuration in goland. Now you can debug cardinal with break points.
  • Read routes were getting wrapped in SignedPayload. Now all routes with regexp: "^query/*" will not be signed.
  • test client for http tests defaults to 127.0.0.1:7350 if not set by environment variable. Prevents developer from setting this variable.

Testing:

  • Added a bunch of http tests that test various routes and functionality within start-game-template. This includes the new swagger routes.

@pyrofolium pyrofolium requested a review from a team September 19, 2023 21:21
nakama/main.go Outdated Show resolved Hide resolved
nakama/main.go Outdated Show resolved Hide resolved
testsuite/testsuite_test.go Show resolved Hide resolved
nakama/cardinal.go Outdated Show resolved Hide resolved
nakama/main.go Outdated Show resolved Hide resolved
nakama/main.go Show resolved Hide resolved
testsuite/testsuite_test.go Show resolved Hide resolved
nakama/main.go Outdated Show resolved Hide resolved
nakama/main.go Outdated Show resolved Hide resolved
nakama/cardinal.go Outdated Show resolved Hide resolved
nakama/main.go Show resolved Hide resolved
testsuite/testsuite_test.go Outdated Show resolved Hide resolved
testsuite/testsuite_test.go Outdated Show resolved Hide resolved
testsuite/testsuite_test.go Show resolved Hide resolved
@pyrofolium pyrofolium merged commit b626f34 into main Sep 20, 2023
6 checks passed
}
if resp.StatusCode != 200 {
body, _ := io.ReadAll(resp.Body)
return logError(logger, "bad status code: %w: %s", resp.Status, body)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return logError(logger, "bad status code: %w: %s", resp.Status, body)
return logError(logger, "bad status code: %s: %v", resp.Status, body)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops I'll make another pr for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants