summaryrefslogtreecommitdiff
path: root/service/http/attributes/attributes_test.go
diff options
context:
space:
mode:
authorParamtamtam <[email protected]>2019-12-24 10:48:49 +0500
committerGitHub <[email protected]>2019-12-24 10:48:49 +0500
commitfbd2022729ab7ffe4eee8ba8b7357ba179e4d010 (patch)
treefa6b66b18259282b2efe00a41c445a3fa40aa701 /service/http/attributes/attributes_test.go
parent3f7d8bc007a4efdd48bb16253c2686006f0f9cda (diff)
parent75a817edcff22e721dcc3a7fa5590b866f630403 (diff)
Merge branch 'master' into master
Diffstat (limited to 'service/http/attributes/attributes_test.go')
-rw-r--r--service/http/attributes/attributes_test.go20
1 files changed, 16 insertions, 4 deletions
diff --git a/service/http/attributes/attributes_test.go b/service/http/attributes/attributes_test.go
index a71d6542..2360fd12 100644
--- a/service/http/attributes/attributes_test.go
+++ b/service/http/attributes/attributes_test.go
@@ -10,7 +10,10 @@ func TestAllAttributes(t *testing.T) {
r := &http.Request{}
r = Init(r)
- Set(r, "key", "value")
+ err := Set(r, "key", "value")
+ if err != nil {
+ t.Errorf("error during the Set: error %v", err)
+ }
assert.Equal(t, All(r), map[string]interface{}{
"key": "value",
@@ -34,7 +37,10 @@ func TestGetAttribute(t *testing.T) {
r := &http.Request{}
r = Init(r)
- Set(r, "key", "value")
+ err := Set(r, "key", "value")
+ if err != nil {
+ t.Errorf("error during the Set: error %v", err)
+ }
assert.Equal(t, Get(r, "key"), "value")
}
@@ -55,13 +61,19 @@ func TestSetAttribute(t *testing.T) {
r := &http.Request{}
r = Init(r)
- Set(r, "key", "value")
+ err := Set(r, "key", "value")
+ if err != nil {
+ t.Errorf("error during the Set: error %v", err)
+ }
assert.Equal(t, Get(r, "key"), "value")
}
func TestSetAttributeNone(t *testing.T) {
r := &http.Request{}
- Set(r, "key", "value")
+ err := Set(r, "key", "value")
+ if err != nil {
+ t.Errorf("error during the Set: error %v", err)
+ }
assert.Equal(t, Get(r, "key"), nil)
}