Skip to content

Commit b6068a0

Browse files
Remove weak unit test for json serialisation
1 parent be3d5fa commit b6068a0

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed
Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,14 @@
11
package sqs
22

33
import (
4-
"fmt"
54
"testing"
65

76
"github.com/aws/aws-sdk-go/aws"
8-
"github.com/goadapp/goad/api"
97
"github.com/stretchr/testify/assert"
108
)
119

12-
func init() {
13-
}
14-
1510
func TestAdapterConstruction(t *testing.T) {
1611
config := aws.NewConfig().WithRegion("somewhere")
1712
testsqs := NewSQSAdapter(config, "testqueue")
1813
assert.Equal(t, testsqs.QueueURL, "testqueue")
1914
}
20-
21-
func TestJSON(t *testing.T) {
22-
assert := assert.New(t)
23-
// This test just verifies the json api.
24-
result := api.RunnerResult{
25-
RequestCount: 299,
26-
TimedOut: 234,
27-
ConnectionErrors: 256,
28-
AveTimeToFirst: 9999,
29-
BytesRead: 2136,
30-
// Statuses: new(map[string]int),
31-
AveTimeForReq: 12345,
32-
// AveReqPerSec: 6789,
33-
// AveKBytesPerSec: 6789,
34-
Slowest: 4567,
35-
Fastest: 4567,
36-
Region: "eu-west",
37-
RunnerID: 0,
38-
FatalError: "sorry",
39-
}
40-
str, jsonerr := jsonFromResult(result)
41-
if jsonerr != nil {
42-
fmt.Println(jsonerr)
43-
return
44-
}
45-
json, err := resultFromJSON(str)
46-
if err != nil {
47-
t.Fatal(err)
48-
}
49-
assert.EqualValues(result, json, "Should serialize and deserialize without error and loosing information")
50-
}

0 commit comments

Comments
 (0)