-
Notifications
You must be signed in to change notification settings - Fork 89
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
Changes from 3 commits
a4b47ac
2e2bd16
265e772
b9e7264
a277468
0022346
c824791
25f85ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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() | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We didn't need to add this, because we are testing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I have added it. |
||||||
|
||||||
go func() { | ||||||
assert.EqualError(t, route.Run(), "host can't be empty") | ||||||
|
@@ -53,6 +54,7 @@ func TestRun(t *testing.T) { | |||||
setup: func(host string) error { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||
mockConfig.On("GetBool", "app.debug").Return(true).Once() | ||||||
mockConfig.On("GetString", "route.host").Return(host).Once() | ||||||
mockConfig.On("GetString", "route.port").Return("test_ca.port").Once() | ||||||
|
||||||
go func() { | ||||||
assert.Nil(t, route.Run()) | ||||||
|
@@ -116,6 +118,7 @@ func TestRunTLS(t *testing.T) { | |||||
name: "error when default host is empty", | ||||||
setup: func(host string) error { | ||||||
mockConfig.On("GetString", "route.tls.host").Return(host).Once() | ||||||
mockConfig.On("GetString", "route.tls.port").Return("test_ca.port").Once() | ||||||
|
||||||
go func() { | ||||||
assert.EqualError(t, route.RunTLS(), "host can't be empty") | ||||||
|
@@ -130,6 +133,7 @@ func TestRunTLS(t *testing.T) { | |||||
setup: func(host string) error { | ||||||
mockConfig.On("GetBool", "app.debug").Return(true).Once() | ||||||
mockConfig.On("GetString", "route.tls.host").Return(host).Once() | ||||||
mockConfig.On("GetString", "route.tls.port").Return("test_ca.port").Once() | ||||||
mockConfig.On("GetString", "route.tls.ssl.cert").Return("test_ca.crt").Once() | ||||||
mockConfig.On("GetString", "route.tls.ssl.key").Return("test_ca.key").Once() | ||||||
|
||||||
|
There was a problem hiding this comment.
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 theconfig/route.go
file ingoravel/goravel
.There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.