p2p_test.go 444 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
// Copyright 2020 The Swarm Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package p2p_test

import (
	"testing"

	"github.com/ethersphere/bee/pkg/p2p"
)

func TestNewSwarmStreamName(t *testing.T) {
14 15
	want := "/swarm/hive/1.2.0/peers"
	got := p2p.NewSwarmStreamName("hive", "1.2.0", "peers")
16 17 18 19 20

	if got != want {
		t.Errorf("got %s, want %s", got, want)
	}
}