-
Notifications
You must be signed in to change notification settings - Fork 9
Testing
In the future, regression may possibly be automated, but in the meantime, here's a list of test cases to run through.
-
Buckets with versioning
-
Sync a particular bucket (versioned)
- π’ Test case: create COMS bucket for S3 bucket with existing objects
- π’ Test case: directly uploading files via S3
-
Sync the default bucket (versioned)
- π’ Test case: upload some files to the default bucket
-
Syncing tags (versioned)
- π’ Test case: adding tags directly via S3
- π’ Test case: deleting tags directly via S3
- π’ Test case: reuse
objectId
from existingcoms-id
tag - π’ Test case: deleting the
coms-id
tag - π’ Test case: syncing objects with 10 tags
-
Sync a particular object (versioned)
- π’ Test case: update existing object
- π’ Test case: sync object with no new changes
- π’ Test case: soft-deleting objects directly via S3
- π’ Test case: hard-deleting objects directly via S3
- π’ Test case: undoing a soft deletion directly via S3
-
Sync a particular bucket (versioned)
-
Buckets without versioning
-
Sync a particular bucket (unversioned)
- π’ Test case: create COMS bucket for S3 bucket with existing objects
- π’ Test case: directly uploading files via S3
-
Sync the default bucket (unversioned)
- π’ Test case: upload some files to the default bucket
-
Syncing tags (unversioned)
- π’ Test case: adding tags directly via S3
- π’ Test case: deleting tags directly via S3
- π’ Test case: reuse
objectId
from existingcoms-id
tag - π’ Test case: deleting the
coms-id
tag - π’ Test case: syncing objects with 10 tags
-
Sync a particular object (unversioned)
- π’ Test case: update existing object
- π’ Test case: sync object with no new changes
- π’ Test case: deleting an object
-
Sync a particular bucket (unversioned)
Tests should be run on all of the following types of S3 buckets:
- Buckets with versioning enabled
- Buckets with versioning disabled
- NRM object storage service (Dell ECS, but mostly S3-compliant)
- Both versioned and unversioned buckets
Sync a particular bucket so that COMS tracks all of the files in the corresponding S3 bucket.
- An existing S3 bucket is available
- Upload some files directly to an S3 bucket
- Create a COMS bucket (i.e.
PUT /bucket
) for said S3 bucket and save thebucketId
GET /bucket/:bucketId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
{number of files in COMS bucket} === {number of files in S3}
{names of files in COMS bucket} === {names of files in S3}
- Files marked as soft-deleted in S3 are tracked and marked as such by COMS
- Create a COMS bucket (i.e.
PUT /bucket
) and save thebucketId
- Upload some files directly via S3
GET /bucket/:bucketId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
{number of files in COMS bucket} === {number of files in S3}
{names of files in COMS bucket} === {names of files in S3}
Sync the default bucket so that COMS tracks all of the files in the corresponding S3 bucket.
- COMS has been configured with a default S3 bucket
- Upload some files directly via S3
GET /sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
{number of files in default COMS bucket} === {number of files in S3}
{names of files in default COMS bucket} === {names of files in S3}
Sync a bucket and ensure that any changes to object tags made externally are correctly synced to COMS.
- An existing S3 bucket is available and is being managed by COMS
- Upload file to bucket via COMS API and save the
objectId
- Add a tag directly via S3
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
GET /object/tagging?objectId={objectId}
- COMS tags for the object are the same as its S3 object tags
- Upload file to bucket via COMS API with some tags(i.e.
PUT /object?tagset[{key}]={value}
) and save theobjectId
- Delete a tag directly via S3
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
GET /object/tagging?objectId={objectId}
- COMS tags for the object are the same as its S3 object tags
- Upload file to bucket via the COMS API (i.e.
PUT /object
) - Delete the table entry for the corresponding object in the COMS database (i.e.
DELETE FROM object WHERE id={objectId}
) GET /bucket/:bucketId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
- The
coms-id
S3 tag is unchanged before/after deleting the object from the COMSobject
table -
objectId
should equal thecoms-id
S3 tag
- Upload file to bucket via COMS API and save the
objectId
- Delete the
coms-id
tag directly via S3 - Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
GET /object/tagging?objectId={objectId}
GET /object/:objectId/
-
coms-id
tag is present and has{objectId}
as its value -
GET /object/:objectId/
returns a HTTP 200
- Upload a file to the bucket directly via S3.
- Add 10 tags to the file uploaded via S3.
GET /bucket/:bucketId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
- File is added to COMS with all its tags
- No
coms-id
tag is added
Sync a particular object so that COMS tracks all of the changes in the corresponding S3 object.
- There is a COMS bucket that links to an existing versioned S3 bucket
- Upload file via COMS API (i.e.
PUT /object
) - Overwrite just-uploaded file with a newer version directly via S3
GET /object/:objectId/sync
- Call
GET /sync/status
every few seconds
- On the first call, assert that it returns
1
- Continue to call the endpoint every few seconds until returns
0
GET /object/:objectId/
{contents of file retrieved via COMS} === {contents of file uploaded via S3}
{latest version ID of file on COMS} === {latest version ID of file on S3}
- Upload file via COMS API (i.e.
PUT /object
) GET /object/:objectId/sync
- Call
GET /sync/status
every few seconds
- On the first call, assert that it returns
1
- Continue to call the endpoint every few seconds until returns
0
GET /object/:objectId/
-
GET /sync/status
returns0
{contents of file retrieved via COMS} === {contents of file uploaded via S3}
{latest version ID of file on COMS} === {latest version ID of file on S3}
- Upload file via COMS API (i.e.
PUT /object
) - Soft-delete object directly via S3
GET /object/:objectId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
1
- Continue to call the endpoint every few seconds until returns
0
GET /object/:objectId/
GET /object/:objectId/version
{contents of file retrieved via COMS} === {contents of file uploaded via S3}
-
{latest S3 version ID of file on COMS} === {latest version ID of file on S3}
- The latest version of the COMS object is a delete marker; i.e.
isLatest === true && deleteMarker === true
- The latest version of the COMS object is a delete marker; i.e.
- Upload file via COMS API (i.e.
PUT /object
) - Delete latest version of object directly via S3
GET /object/:objectId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
1
- Continue to call the endpoint every few seconds until returns
0
GET /object/:objectId/
-
GET /object/:objectId/
returns HTTP 404
- Upload file via COMS API (i.e.
PUT /object
) - Soft-delete object via COMS API
- Restore deleted object directly via S3 (i.e. by deleting the latest version, which should be a "delete marker" version)
GET /object/:objectId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
1
- Continue to call the endpoint every few seconds until returns
0
GET /object/:objectId/
GET /object/:objectId/version
{content of file retrieved via COMS} === {contents of file version restored in S3}
-
{latest version ID of file on COMS} === {latest version ID of file on S3}
- The latest version of the COMS object is not a delete marker; i.e. `isLatest === true && deleteMarker === false
Sync a particular bucket so that COMS tracks all of the files in the corresponding S3 bucket.
- An existing S3 bucket is available
- Upload some files directly to an S3 bucket
- Create a COMS bucket (i.e.
PUT /bucket
) for said S3 bucket and save thebucketId
GET /bucket/:bucketId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
{number of files in COMS bucket} === {number of files in S3}
{names of files in COMS bucket} === {names of files in S3}
- Files marked as soft-deleted in S3 are tracked and marked as such by COMS
- Create a COMS bucket (i.e.
PUT /bucket
) and save thebucketId
- Upload some files directly via S3
GET /bucket/:bucketId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
{number of files in COMS bucket} === {number of files in S3}
{names of files in COMS bucket} === {names of files in S3}
Sync the default bucket so that COMS tracks all of the files in the corresponding S3 bucket.
- COMS has been configured with a default S3 bucket
- Upload some files directly via S3
GET /sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
{number of files in default COMS bucket} === {number of files in S3}
{names of files in default COMS bucket} === {names of files in S3}
Sync a bucket and ensure that any changes to object tags made externally are correctly synced to COMS.
- An existing S3 bucket is available and is being managed by COMS
- Upload file to bucket via COMS API and save the
objectId
- Add a tag directly via S3
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
GET /object/tagging?objectId={objectId}
- COMS tags for the object are the same as its S3 object tags
- Upload file to bucket via COMS API with some tags(i.e.
PUT /object?tagset[{key}]={value}
) and save theobjectId
- Delete a tag directly via S3
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
GET /object/tagging?objectId={objectId}
- COMS tags for the object are the same as its S3 object tags
- Upload file to bucket via the COMS API (i.e.
PUT /object
) - Delete the table entry for the corresponding object in the COMS database (i.e.
DELETE FROM object WHERE id={objectId}
) GET /bucket/:bucketId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
- The
coms-id
S3 tag is unchanged before/after deleting the object from the COMSobject
table -
objectId
should equal thecoms-id
S3 tag
- Upload file to bucket via COMS API and save the
objectId
- Delete the
coms-id
tag directly via S3 - Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
GET /object/tagging?objectId={objectId}
GET /object/:objectId/
-
coms-id
tag is present and has{objectId}
as its value -
GET /object/:objectId/
returns a HTTP 200
- Upload a file to the bucket directly via S3.
- Add 10 tags to the file uploaded via S3.
GET /bucket/:bucketId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
{number of files uploaded via S3}
- Continue to call the endpoint every few seconds until returns
0
- File is added to COMS with all its tags
- No
coms-id
tag is added
Sync a particular object so that COMS tracks all of the changes in the corresponding S3 object.
- There is a COMS bucket that links to an existing unversioned S3 bucket
- Upload file via COMS API (i.e.
PUT /object
) - Overwrite just-uploaded file directly via S3
GET /object/:objectId/sync
- Call
GET /sync/status
every few seconds
- On the first call, assert that it returns
1
- Continue to call the endpoint every few seconds until returns
0
{contents of file retrieved via COMS} === {contents of file uploaded via S3}
- Upload file via COMS API (i.e.
PUT /object
) GET /object/:objectId/sync
- Call
GET /sync/status
every few seconds
- On the first call, assert that it returns
1
- Continue to call the endpoint every few seconds until returns
0
GET /object/:objectId/
-
GET /sync/status
returns0
{contents of file retrieved via COMS} === {contents of file uploaded via S3}
- Upload file via COMS API (i.e.
PUT /object
) - Delete file directly via S3
GET /object/:objectId/sync
- Call
GET /sync/status
every few seconds, until it returns0
- On the first call, assert that it returns
1
- Continue to call the endpoint every few seconds until returns
0
GET /object/:objectId/
-
GET /object/:objectId/
returns HTTP 404
Return Home
API User Guide:
- Authentication
- Endpoint Notes
- Permissions
- Metadata and Tags
- Managing buckets
- Synchronization
- Use-Case Examples
Deployment Guide:
The Hosted Service: