test: build example in jenkins

Add command for generating coverage
This commit is contained in:
Anthony Laibe
2021-11-01 20:40:39 +01:00
parent 268767262b
commit 94e8b9cf86
6 changed files with 37 additions and 9 deletions
+3 -3
View File
@@ -40,7 +40,7 @@ func main() {
wakuNode, err := node.New(ctx,
node.WithPrivateKey(prvKey),
node.WithHostAddress([]net.Addr{hostAddr}),
node.WithHostAddress([]*net.TCPAddr{hostAddr}),
node.WithWakuRelay(),
)
if err != nil {
@@ -93,7 +93,7 @@ func write(ctx context.Context, wakuNode *node.WakuNode, msgContent string) {
Timestamp: timestamp,
}
_, err = wakuNode.Publish(ctx, msg, nil)
_, err = wakuNode.Relay().Publish(ctx, msg, nil)
if err != nil {
log.Error("Error sending a message: ", err)
}
@@ -107,7 +107,7 @@ func writeLoop(ctx context.Context, wakuNode *node.WakuNode) {
}
func readLoop(ctx context.Context, wakuNode *node.WakuNode) {
sub, err := wakuNode.Subscribe(ctx, nil)
sub, err := wakuNode.Relay().Subscribe(ctx, nil)
if err != nil {
log.Error("Could not subscribe: ", err)
return