Skip to content

Commit ebc72d5

Browse files
committed
Implement 'osnadmin channel info' subcommand and update tests
Signed-off-by: Priyansu Rout <[email protected]>
1 parent f88783d commit ebc72d5

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

cmd/osnadmin/main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ func executeForArgs(args []string) (output string, exit int, err error) {
5252
configBlockPath := join.Flag("config-block", "Path to the file containing an up-to-date config block for the channel").Short('b').Required().String()
5353

5454
list := channel.Command("list", "List channel information for an Ordering Service Node (OSN). If the channelID flag is set, more detailed information will be provided for that channel.")
55-
// listChannelID := list.Flag("channelID", "Channel ID").Short('c').String()
56-
// Define the new info subcommand
5755
info := channel.Command("info", "Get detailed information about a specific channel.")
5856
infoChannelID := info.Flag("channelID", "Channel ID").Short('c').Required().String()
5957

cmd/osnadmin/main_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -209,20 +209,6 @@ var _ = Describe("osnadmin", func() {
209209
}, nil)
210210
})
211211

212-
It("returns an error when channelID flag is not provided", func() {
213-
args := []string{
214-
"channel",
215-
"info",
216-
"--orderer-address", ordererURL,
217-
"--ca-file", ordererCACert,
218-
"--client-cert", clientCert,
219-
"--client-key", clientKey,
220-
}
221-
output, exit, err := executeForArgs(args)
222-
expectedErrorMessage := "required flag(s) \"channelID\" not set"
223-
checkCLIError(output, exit, err, expectedErrorMessage)
224-
})
225-
226212
It("uses the channel participation API to list the details of a single channel", func() {
227213
args := []string{
228214
"channel",
@@ -311,7 +297,6 @@ var _ = Describe("osnadmin", func() {
311297
checkStatusOutput(output, exit, err, 404, expectedOutput)
312298
})
313299
})
314-
315300
})
316301
})
317302

0 commit comments

Comments
 (0)