[#222] Add support for aio v1.7.0 in integration tests #239
No reviewers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-http-gw#239
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "KurlesHS/frostfs-http-gw:feature/add-aio-1.7.0-integration-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
close #222
WIP: [#222] Add support for aio v1.7.0 in integration teststo [#222] Add support for aio v1.7.0 in integration tests@ -53,1 +58,4 @@
func versionToUint(t *testing.T, v string) uint64 {
parts := strings.Split(v, ".")
require.Len(t, parts, 3)
What about versions like
v0.33.0-rc.6
?This function is used to convert the version numbers of aio-containers (which we test and explicitly list at the beginning of the TestIntegration function) into a numeric format. The versions follow the "MAJOR.MINOR.PATCH" format. If in the future there's a need to support versions with an additional suffix (e.g., "1.7.2-nightly1"), this function can be extended accordingly—but for now, that would be premature.
@ -54,0 +72,4 @@
func publicReadWriteRules() []chain.Rule {
return []chain.Rule{
{
Status: chain.Allow, Actions: chain.Actions{
Can we fix formatting (run
make fmt
at least)?For example:
Please align brackets
{
and
Any: false},
For some reason, gofmt is totally fine with this on my machine. =(
@ -54,0 +99,4 @@
Op: chain.CondStringEquals,
Kind: chain.KindRequest,
Key: native.PropertyKeyActorRole,
Value: native.PropertyValueContainerRoleOwner,
I don't know how exactly storage node determines role when bearer token is applied, but I think using public key condition is more robust
cc @alexvanin
@ -566,2 +630,3 @@
func createContainerBase(ctx context.Context, t *testing.T, clientPool *pool.Pool, ownerID user.ID, basicACL acl.Basic, name string) (cid.ID, error) {
func createContainerWithAPE(ctx context.Context, t *testing.T, clientPool *pool.Pool, ownerID user.ID, name string) (cid.ID, error) {
return createContainerBase(ctx, t, clientPool, ownerID, acl.PublicRWExtended, publicReadWriteRules(), name)
acl here must be
0
instead ofacl.PublicRWExtended
@ -568,0 +632,4 @@
return createContainerBase(ctx, t, clientPool, ownerID, acl.PublicRWExtended, publicReadWriteRules(), name)
}
func waitForAPECacheInvalidated(ctx context.Context, clientPool *pool.Pool, expectedCh chain.Chain, cnrID cid.ID) error {
Maybe the better name is
waitForAPEBeApplied
or something like this?@ -568,0 +640,4 @@
},
}
checkCtxDone := func(ctx context.Context) error {
By the way, why do need this function?
Can we just get error from
clientPool.ListAPEChains
(we pass context there) or by usingctx.Err()
whencase <- ctx.Done():
happens?@ -568,0 +664,4 @@
// At the moment, according to the core team, there is no way through the API
// to check whether the APE chain stored in the contact has been applied to the container.
// So after we make sure that the APE chain is stored, we just wait for a certain period of time
// (8 seconds by default, the time until the next block and cache invalidation)
Maybe we should use AIO images where this cache is disables at all?
cc @alexvanin
@ -568,0 +697,4 @@
}
err = clientPool.AddAPEChain(ctx, prmAddAPEChain)
require.NoError(t, err)
err = waitForAPECacheInvalidated(ctx, clientPool, ch, cnrID)
Should we check
err
here too?@ -602,2 +747,4 @@
fmt.Println(CID.String())
if len(apeRules) != 0 {
chainID := randomString()
Why not just
?
6969be9ac1
to101d6370b8
[#222] Add support for aio v1.7.0 in integration teststo WIP: [#222] Add support for aio v1.7.0 in integration tests101d6370b8
to91c2aeead8
91c2aeead8
to3b0883086f
WIP: [#222] Add support for aio v1.7.0 in integration teststo [#222] Add support for aio v1.7.0 in integration testsView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.