[#206] cli/container: Use GetEACLWithSignature in set-eacl polling

Replace GetEACL call with GetEACLWithSignature one in polling step of
set-eacl command of container CLI.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-25 10:39:13 +03:00 committed by Leonard Lyubich
parent e8bc03d92f
commit b4699b1e9f

View file

@ -422,10 +422,10 @@ Container ID in EACL table will be substituted with ID from the CLI.`,
for i := 0; i < awaitTimeout; i++ {
time.Sleep(1 * time.Second)
table, err := cli.GetEACL(ctx, id, client.WithTTL(getTTL()))
eaclSig, err := cli.GetEACLWithSignature(ctx, id, client.WithTTL(getTTL()))
if err == nil {
// compare binary values because EACL could have been set already
got, err := table.Marshal()
got, err := eaclSig.EACL().Marshal()
if err != nil {
continue
}