Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openfaas-faas
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Team Jaz CS 598 CCC Final Project
openfaas-faas
Commits
9f2183f6
Commit
9f2183f6
authored
8 years ago
by
Alex Ellis
Browse files
Options
Downloads
Patches
Plain Diff
Update test names
parent
15f908c0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gateway/handlers/alerthandler.go
+2
-2
2 additions, 2 deletions
gateway/handlers/alerthandler.go
gateway/tests/integration/routes_test.go
+3
-3
3 additions, 3 deletions
gateway/tests/integration/routes_test.go
with
5 additions
and
5 deletions
gateway/handlers/alerthandler.go
+
2
−
2
View file @
9f2183f6
...
@@ -82,8 +82,8 @@ func MakeAlertHandler(c *client.Client) http.HandlerFunc {
...
@@ -82,8 +82,8 @@ func MakeAlertHandler(c *client.Client) http.HandlerFunc {
}
}
if
len
(
req
.
Alerts
)
>
0
{
if
len
(
req
.
Alerts
)
>
0
{
err
:=
scaleService
(
req
,
c
)
if
err
!=
nil
{
if
err
:=
scaleService
(
req
,
c
);
err
!=
nil
{
log
.
Println
(
err
)
log
.
Println
(
err
)
w
.
WriteHeader
(
http
.
StatusInternalServerError
)
w
.
WriteHeader
(
http
.
StatusInternalServerError
)
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
gateway/tests/integration/routes_test.go
+
3
−
3
View file @
9f2183f6
...
@@ -42,7 +42,7 @@ func fireRequestWithHeader(url string, method string, reqBody string, xheader st
...
@@ -42,7 +42,7 @@ func fireRequestWithHeader(url string, method string, reqBody string, xheader st
return
string
(
body
),
res
.
StatusCode
,
readErr
return
string
(
body
),
res
.
StatusCode
,
readErr
}
}
func
Test
_
Get_Rejected
(
t
*
testing
.
T
)
{
func
TestGet_Rejected
(
t
*
testing
.
T
)
{
var
reqBody
string
var
reqBody
string
_
,
code
,
err
:=
fireRequest
(
"http://localhost:8080/function/func_echoit"
,
http
.
MethodGet
,
reqBody
)
_
,
code
,
err
:=
fireRequest
(
"http://localhost:8080/function/func_echoit"
,
http
.
MethodGet
,
reqBody
)
if
code
!=
http
.
StatusInternalServerError
{
if
code
!=
http
.
StatusInternalServerError
{
...
@@ -56,7 +56,7 @@ func Test_Get_Rejected(t *testing.T) {
...
@@ -56,7 +56,7 @@ func Test_Get_Rejected(t *testing.T) {
}
}
func
Test
_
EchoIt_Post_Route_Handler
(
t
*
testing
.
T
)
{
func
TestEchoIt_Post_Route_Handler
(
t
*
testing
.
T
)
{
reqBody
:=
"test message"
reqBody
:=
"test message"
body
,
code
,
err
:=
fireRequest
(
"http://localhost:8080/function/func_echoit"
,
http
.
MethodPost
,
reqBody
)
body
,
code
,
err
:=
fireRequest
(
"http://localhost:8080/function/func_echoit"
,
http
.
MethodPost
,
reqBody
)
...
@@ -73,7 +73,7 @@ func Test_EchoIt_Post_Route_Handler(t *testing.T) {
...
@@ -73,7 +73,7 @@ func Test_EchoIt_Post_Route_Handler(t *testing.T) {
}
}
}
}
func
Test
_
EchoIt_Post_Header_Handler
(
t
*
testing
.
T
)
{
func
TestEchoIt_Post_Header_Handler
(
t
*
testing
.
T
)
{
reqBody
:=
"test message"
reqBody
:=
"test message"
body
,
code
,
err
:=
fireRequestWithHeader
(
"http://localhost:8080/"
,
http
.
MethodPost
,
reqBody
,
"func_echoit"
)
body
,
code
,
err
:=
fireRequestWithHeader
(
"http://localhost:8080/"
,
http
.
MethodPost
,
reqBody
,
"func_echoit"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment