Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: ZENKO-704 Backbeat object monitor tests #198

Merged
merged 1 commit into from
Jul 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/zenko_e2e/backbeat/ReplicationUtility.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@ class ReplicationUtility {
};
return this.s3.completeMultipartUpload(params, next);
},
], err => {
], (err, data) => {
if (err) {
return this.s3.abortMultipartUpload({
Bucket: bucketName,
Key: objectName,
UploadId: uploadId,
}, () => cb(err));
}
return cb();
return cb(null, data);
});
}

Expand Down
37 changes: 28 additions & 9 deletions tests/zenko_e2e/backbeat/Using.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Quickstart

Steps to run end-to-end tests for CRR to AWS:
## Steps

1. In the hosts file `/etc/hosts` map `127.0.0.1` to `zenko.local`. For example,
by adding the line:
Expand All @@ -17,11 +17,17 @@ export ZENKO_BACKBEAT_ACCESS_KEY=<access-key>
export ZENKO_BACKBEAT_SECRET_KEY=<secret-key>
```

4. Create a bucket on AWS `<destination-bucket-name>` with versioning enabled.
5. In Orbit, create an AWS location `<destination-location-name>` with an AWS
3. Install node and npm.
4. Navigate to `Zenko/tests/zenko_e2e/backbeat`.
5. Install node modules: `npm i`.

### Tests for CRR to AWS:

1. Create a bucket on AWS `<destination-bucket-name>` with versioning enabled.
2. In Orbit, create an AWS location `<destination-location-name>` with an AWS
`<destination-bucket-name>`.
6. In Orbit, create an AWS location `<source-location-name>`.
7. Export the access key, secret key, AWS bucket name, and AWS location:
3. In Orbit, create an AWS location `<source-location-name>`.
4. Export the access key, secret key, AWS bucket name, and AWS location:

```
export AWS_S3_BACKBEAT_ACCESS_KEY=<access-key>
Expand All @@ -31,7 +37,20 @@ export AWS_DESTINATION_LOCATION=<destination-location-name>
export AWS_SOURCE_LOCATION=<source-location-name>
```

8. Install node and npm.
9. Navigate to `Zenko/tests/zenko_e2e/backbeat`.
10. Install node modules: `npm i`.
11. Run the test suite: `npm run test_crr`.
5. Run the test suite: `npm run test_crr`.

### Tests for Backbeat API:

1. Create a bucket on AWS `<destination-bucket-name>` with versioning enabled.
2. In Orbit, create an AWS location `<destination-location-name>` with an AWS
`<destination-bucket-name>`.
3. Export the access key, secret key, AWS bucket name, and AWS location:

```
export AWS_S3_BACKBEAT_ACCESS_KEY=<access-key>
export AWS_S3_BACKBEAT_SECRET_KEY=<secret-key>
export AWS_S3_BACKBEAT_BUCKET_NAME=<destination-bucket-name>
export AWS_DESTINATION_LOCATION=<destination-location-name>
```

4. Run the test suite: `npm run test_api`.
Loading