Skip to content

Commit

Permalink
Delete container EACL (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-khimov authored Sep 22, 2023
2 parents d2f3761 + 7f024c6 commit 8170ce1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions container/container_contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ func removeContainer(ctx storage.Context, id []byte, owner []byte) {
storage.Delete(ctx, containerListKey)

storage.Delete(ctx, append([]byte{containerKeyPrefix}, id...))
storage.Delete(ctx, append(eACLPrefix, id...))
}

func getAllContainers(ctx storage.Context) [][]byte {
Expand Down
2 changes: 2 additions & 0 deletions tests/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ func TestContainerSetEACL(t *testing.T) {
checkInvalidEACL(prefix, missingContainerException)
checkInvalidEACL(append(prefix, make([]byte, len(cnt.id)-1)...), missingContainerException)
c.Invoke(t, stackitem.Null{}, "setEACL", replaceEACLArg(append(prefix, cnt.id[:]...))...)
c.Invoke(t, stackitem.Null{}, "delete", cnt.id[:], cnt.sig, cnt.token)
c.InvokeFail(t, container.NotFoundError, "eACL", cnt.id[:])
}

func TestContainerSizeEstimation(t *testing.T) {
Expand Down

0 comments on commit 8170ce1

Please sign in to comment.