| 1 | package stressClient |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | ) |
| 6 | |
| 7 | func TestNewResponse(t *testing.T) { |
| 8 | pt := NewBlankTestPoint() |
| 9 | tr := NewTracer(map[string]string{}) |
| 10 | r := NewResponse(pt, tr) |
| 11 | expected := "another_tag_value" |
| 12 | test, err := r.AddTags(map[string]string{"another_tag": "another_tag_value"}) |
| 13 | if err != nil { |
| 14 | t.Fatal(err) |
| 15 | } |
| 16 | got := test.Tags()["another_tag"] |
| 17 | if expected != got { |
| 18 | t.Errorf("expected: %v\ngot: %v\n", expected, got) |
| 19 | } |
| 20 | } |