You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
configUpdateEnvelopePath:=update.Flag("config-update-envelope", "Path to the file containing an up-to-date config update envelope for the channel").Short('e').Required().String()
64
+
tlsHandshakeTimeShift:=update.Flag("tlsHandshakeTimeShift", "The amount of time to shift backwards for certificate expiration checks during TLS handshakes with the orderer endpoint").Short('t').Default("0").Duration()
Expect(err).To(MatchError("unknown short flag '-z'"))
573
+
It("returns with exit code 1 and prints the error", func() {
574
+
args:= []string{
575
+
"channel",
576
+
"update",
577
+
"--orderer-address", ordererURL,
578
+
"--channelID", channelID,
579
+
"--config-update-envelope", envelopePath,
580
+
"--ca-file", ordererCACert,
581
+
"--client-cert", clientCert,
582
+
"--client-key", clientKey,
583
+
}
584
+
output, exit, err:=executeForArgs(args)
585
+
586
+
checkFlagError(output, exit, err, "failed to retrieve channel id - payload header is empty")
581
587
})
582
588
})
583
589
584
-
Context("when the ca cert cannot be read", func() {
590
+
Context("when the --channelID does not match the channel ID in the envelope", func() {
585
591
BeforeEach(func() {
586
-
ordererCACert="not-the-ca-cert-youre-looking-for"
592
+
channelID="not-the-channel-youre-looking-for"
587
593
})
588
594
589
595
It("returns with exit code 1 and prints the error", func() {
590
596
args:= []string{
591
597
"channel",
592
-
"list",
598
+
"update",
593
599
"--orderer-address", ordererURL,
594
600
"--channelID", channelID,
601
+
"--config-update-envelope", envelopePath,
595
602
"--ca-file", ordererCACert,
596
603
"--client-cert", clientCert,
597
604
"--client-key", clientKey,
598
605
}
599
606
output, exit, err:=executeForArgs(args)
600
-
checkFlagError(output, exit, err, "reading orderer CA certificate: open not-the-ca-cert-youre-looking-for: no such file or directory")
607
+
608
+
checkFlagError(output, exit, err, "specified --channelID not-the-channel-youre-looking-for does not match channel ID testing123 in config update envelope")
601
609
})
602
610
})
603
611
604
-
Context("when the ca-file contains a private key instead of certificate(s)", func() {
612
+
Context("when the envelope isn't a valid config update", func() {
0 commit comments