Skip to content

Commit 7603ae0

Browse files
committed
[FAB-4069] Write unit tests for peer/version
This patch adds a test for the package peer/version. Code coverage is 100%. Change-Id: Iba6e4bb81314b3341ede23748a4d7ad02051dd3f Signed-off-by: Yuki Kondo <[email protected]>
1 parent 52f1942 commit 7603ae0

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

peer/version/version_test.go

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
Copyright Hitachi America, Ltd. 2017 All Rights Reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package version
18+
19+
import (
20+
"testing"
21+
22+
"github.com/stretchr/testify/assert"
23+
)
24+
25+
func TestCmd(t *testing.T) {
26+
cmd := Cmd()
27+
assert.NoError(t, cmd.Execute(), "expected version command to succeed")
28+
}

0 commit comments

Comments
 (0)