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

patch: modified the Route.Run() to use APP_PORT #58

Merged
merged 8 commits into from
Feb 28, 2023
Merged

patch: modified the Route.Run() to use APP_PORT #58

merged 8 commits into from
Feb 28, 2023

Conversation

sidshrivastav
Copy link
Contributor

No description provided.

@sidshrivastav sidshrivastav marked this pull request as draft February 25, 2023 09:12
return errors.New("port can't be empty")
}
completeHost := defaultHost + ":" + defaultPort
host = append(host, completeHost)
Copy link
Contributor

Choose a reason for hiding this comment

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

Great Bro, can you also change the RunTLS method like this? Then we also need to change the config/route.go file in goravel/goravel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I have pushed the changes, I am just try to fix failing test cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @hwbrzzl can you help me with testcases, I am not able to resolve them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hwbrzzl There is some issue with testcases, I am trying to debug it, will push it by Wednesday.

@@ -39,6 +39,7 @@ func TestRun(t *testing.T) {
name: "error when default host is empty",
setup: func(host string) error {
mockConfig.On("GetString", "route.host").Return(host).Once()
mockConfig.On("GetString", "route.port").Return("test_ca.port").Once()
Copy link
Contributor

Choose a reason for hiding this comment

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

We didn't need to add this, because we are testing host can't be empty.
We need to add a test case: port can't be empty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I have added it.

@@ -53,6 +54,7 @@ func TestRun(t *testing.T) {
setup: func(host string) error {
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
setup: func(host string) error {
setup: func(host, port string) error {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@sidshrivastav sidshrivastav marked this pull request as ready for review February 27, 2023 17:38
@sidshrivastav
Copy link
Contributor Author

@hwbrzzl Review changes are done, and please find PR for review.

@codecov
Copy link

codecov bot commented Feb 27, 2023

Codecov Report

Base: 48.35% // Head: 48.43% // Increases project coverage by +0.08% 🎉

Coverage data is based on head (25f85ca) compared to base (8d212bc).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
+ Coverage   48.35%   48.43%   +0.08%     
==========================================
  Files         102      102              
  Lines        6320     6330      +10     
==========================================
+ Hits         3056     3066      +10     
  Misses       3070     3070              
  Partials      194      194              
Impacted Files Coverage Δ
route/gin.go 95.52% <100.00%> (+0.78%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@hwbrzzl hwbrzzl left a comment

Choose a reason for hiding this comment

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

Perfect!

@hwbrzzl hwbrzzl enabled auto-merge (squash) February 28, 2023 02:00
@hwbrzzl hwbrzzl merged commit a19dd4a into goravel:master Feb 28, 2023
@hwbrzzl hwbrzzl linked an issue Feb 28, 2023 that may be closed by this pull request
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.

✨ [Feature] Change APP_HOST to APP_HOST and APP_PORT
2 participants