status-im / status-protocol-go

Status Protocol implementation in Go
Mozilla Public License 2.0
0 stars 1 forks source link

Improve test coverage #30

Open adambabik opened 5 years ago

adambabik commented 5 years ago

As a developer I would like to have a good test coverage so that I have confidence that my changes do not break anything.

Description

$ go test -cover .
ok github.com/status-im/status-protocol-go        2.229s        coverage: 46.6% of statements

$ go test -cover ./transport/...
ok github.com/status-im/status-protocol-go/transport/whisper        0.079s        coverage: 4.7% of statements
ok github.com/status-im/status-protocol-go/transport/whisper/filter        0.232s        coverage: 50.6% of statements
? github.com/status-im/status-protocol-go/transport/whisper/internal/sqlite        [no test files]
? github.com/status-im/status-protocol-go/transport/whisper/internal/sqlite/migrations        [no test files]

$ go test -cover ./encryption/...
ok github.com/status-im/status-protocol-go/encryption        56.827s        coverage: 70.6% of statements
? github.com/status-im/status-protocol-go/encryption/internal/sqlite        [no test files]
? github.com/status-im/status-protocol-go/encryption/internal/sqlite/migrations        [no test files]
ok github.com/status-im/status-protocol-go/encryption/multidevice        0.508s        coverage: 60.9% of statements
ok github.com/status-im/status-protocol-go/encryption/publisher        0.043s        coverage: 0.0% of statements
ok github.com/status-im/status-protocol-go/encryption/sharedsecret        0.123s        coverage: 76.8% of statements

Acceptance criteria

cammellos commented 5 years ago

I would probably remove the v1 label, as not strictly necessary, what do you think? (that's not to say that we should not focus on that, but just for clarity.)