aboutsummaryrefslogtreecommitdiff
path: root/lib/http/server_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-12-26 01:53:30 +0700
committerShulhan <ms@kilabit.info>2021-12-26 01:53:30 +0700
commitd7f415e3d9fff5ba6427294b6d6ba8e555056b76 (patch)
treeef7fa2d6df62b77c0c3c7650a799179b52c7d7c3 /lib/http/server_test.go
parent682c9326cc717ac5b698f36f8d46cfbb394cd4a6 (diff)
downloadpakakeh.go-d7f415e3d9fff5ba6427294b6d6ba8e555056b76.tar.xz
lib/http: realign all structs
Changes, * Client: from 56 to 48 bytes (-8 bytes) * CORSOptions: from 104 to 88 bytes (-16 bytes) * Endpoint: from 64 to 32 bytes (-32 bytes) * EndpointRequest: from 72 to 56 bytes (-16 bytes) * route: from 56 to 32 bytes (-24 bytes) Other changes is struct on unit tests.
Diffstat (limited to 'lib/http/server_test.go')
-rw-r--r--lib/http/server_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/http/server_test.go b/lib/http/server_test.go
index 1f87fa45..9b398b62 100644
--- a/lib/http/server_test.go
+++ b/lib/http/server_test.go
@@ -17,13 +17,13 @@ import (
func TestRegisterDelete(t *testing.T) {
cases := []struct {
+ ep *Endpoint
desc string
reqURL string
- ep *Endpoint
- expStatusCode int
expContentType string
expBody string
expError string
+ expStatusCode int
}{{
desc: "With new endpoint",
ep: &Endpoint{
@@ -256,8 +256,8 @@ func TestRegisterGet(t *testing.T) {
cases := []struct {
desc string
reqURL string
- expStatusCode int
expBody string
+ expStatusCode int
}{{
desc: "With root path",
reqURL: "http://127.0.0.1:8080/",
@@ -325,10 +325,10 @@ func TestRegisterHead(t *testing.T) {
cases := []struct {
desc string
reqURL string
- expStatusCode int
expBody string
expContentType []string
expContentLength []string
+ expStatusCode int
}{{
desc: "With root path",
reqURL: "http://127.0.0.1:8080/",
@@ -393,8 +393,8 @@ func TestRegisterPatch(t *testing.T) {
cases := []struct {
desc string
reqURL string
- expStatusCode int
expBody string
+ expStatusCode int
}{{
desc: "With root path",
reqURL: "http://127.0.0.1:8080/",
@@ -456,8 +456,8 @@ func TestRegisterPost(t *testing.T) {
desc string
reqURL string
reqBody string
- expStatusCode int
expBody string
+ expStatusCode int
}{{
desc: "With root path",
reqURL: "http://127.0.0.1:8080/",
@@ -526,8 +526,8 @@ func TestRegisterPut(t *testing.T) {
cases := []struct {
desc string
reqURL string
- expStatusCode int
expBody string
+ expStatusCode int
}{{
desc: "With root path",
reqURL: "http://127.0.0.1:8080/",
@@ -596,8 +596,8 @@ func TestServeHTTPOptions(t *testing.T) {
cases := []struct {
desc string
reqURL string
- expStatusCode int
expAllow string
+ expStatusCode int
}{{
desc: "With root path",
reqURL: "http://127.0.0.1:8080/",
@@ -726,8 +726,8 @@ func TestStatusError(t *testing.T) {
cases := []struct {
desc string
reqURL string
- expStatusCode int
expBody string
+ expStatusCode int
}{{
desc: "With registered error no body",
reqURL: "http://127.0.0.1:8080/error/no-body?k=v",