Skip to content

Commit

Permalink
Implement 'osnadmin channel info' subcommand and update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Priyansu Rout <priyansurout192004@gmail.com>
  • Loading branch information
Priyansurout committed Jun 13, 2024
1 parent f88783d commit ebc72d5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
2 changes: 0 additions & 2 deletions cmd/osnadmin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ func executeForArgs(args []string) (output string, exit int, err error) {
configBlockPath := join.Flag("config-block", "Path to the file containing an up-to-date config block for the channel").Short('b').Required().String()

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.")
// listChannelID := list.Flag("channelID", "Channel ID").Short('c').String()
// Define the new info subcommand
info := channel.Command("info", "Get detailed information about a specific channel.")
infoChannelID := info.Flag("channelID", "Channel ID").Short('c').Required().String()

Expand Down
15 changes: 0 additions & 15 deletions cmd/osnadmin/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,20 +209,6 @@ var _ = Describe("osnadmin", func() {
}, nil)
})

It("returns an error when channelID flag is not provided", func() {
args := []string{
"channel",
"info",
"--orderer-address", ordererURL,
"--ca-file", ordererCACert,
"--client-cert", clientCert,
"--client-key", clientKey,
}
output, exit, err := executeForArgs(args)
expectedErrorMessage := "required flag(s) \"channelID\" not set"
checkCLIError(output, exit, err, expectedErrorMessage)
})

It("uses the channel participation API to list the details of a single channel", func() {
args := []string{
"channel",
Expand Down Expand Up @@ -311,7 +297,6 @@ var _ = Describe("osnadmin", func() {
checkStatusOutput(output, exit, err, 404, expectedOutput)
})
})

})
})

Expand Down

0 comments on commit ebc72d5

Please sign in to comment.