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

Creates new AWS Ruby SDK api commands and tests #87

Merged
merged 3 commits into from
Jul 11, 2017

Conversation

ebozduman
Copy link
Collaborator

@ebozduman ebozduman commented Jul 8, 2017

Since Minio Ruby SDK for Amazon S3 is not available yet, I wrote the basic functionality as part of the Mint testing effort. Then created test cases which basically call these commands and check if the expected values are returned.
I took Minio Java SDK for Amazon S3 list of command as a base, and created Ruby SDK commands using the same names.
Here is the list of commands, for which tests created, in this pull request.
Bucket Operations:

  • makeBucket
  • listBuckets
  • bucketExists?
  • removeBucket
  • listObjects

Object Operations:

  • getObject
  • putObject
  • copyObject
  • statObject
  • removeObjects
  • removeObject

@nitisht
Copy link
Contributor

nitisht commented Jul 8, 2017

Tabbing looks off @ebozduman . Need to probably run the lint tool

Copy link
Contributor

@nitisht nitisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally. LGTM

==================================================

*** List Buckets Test
	Buckets found:72	- Success!
	Making 2 new buckets	- Success!
	- Success!
	Total buckets found now:74	- Success!
	Clean-up	- Success!
*** PASS
==================================================

*** List Objects Test
	Making a bucket	- Success!
	Files/Objects expected: 3
	Files/Objects found: 3	- Success!
	Clean-up	- Success!
*** PASS
==================================================

*** Make Bucket Test
	Making a bucket	- Success!
	Clean-up	- Success!
*** PASS
==================================================

*** Bucket Exists Test
	Checking a non-existing bucket	- Success!
	Clean-up	- Success!
*** PASS
==================================================

*** Remove Bucket Test
	Making a bucket	- Success!
	Deleting the bucket	- Success!
	Clean-up	- Success!
*** PASS
==================================================

*** Upload and Remove Object Test
	Making a bucket	- Success!
	Uploading file	- Success!
	Clean-up	- Success!
*** PASS
==================================================

*** Upload and Remove Object Test
	Making a bucket	- Success!
	Uploading file	- Success!
	Removing file	- Success!
	Clean-up	- Success!
*** PASS
==================================================

*** Download Object Test
	Making a bucket	- Success!
	Uploading file: datafile-1-MB	- Success!
	Downloading it into destination directory: /tmp	- Success!
	Clean-up	- Success!
*** PASS
==================================================

*** Copy Object Test
	Making source bucket: 60d946e08a35	- Success!
	Making target bucket: 712ffd892de2	- Success!
	Uploading file: datafile-1-MB
	... into source bucket: 60d946e08a35	- Success!
	Copying file: datafile-1-MB
	... from source bucket: 60d946e08a35
	... as file: datafile-1-MB
	... into target bucket: 712ffd892de2	- Success!
	Clean-up	- Success!
*** PASS
==================================================

*** Copy Object Test
	Making source bucket: 60d946e08a35	- Success!
	Making target bucket: 712ffd892de2	- Success!
	Uploading file: datafile-1-MB
	... into source bucket: 60d946e08a35	- Success!
	Copying file: datafile-1-MB
	... from source bucket: 60d946e08a35
	... as file: datafile-1-MB-copy
	... into target bucket: 712ffd892de2	- Success!
	Clean-up	- Success!
*** PASS

@nitisht
Copy link
Contributor

nitisht commented Jul 10, 2017

any reviews here @harshavardhana

# Add "https://" to "endpoint" if environment
# variable "ENABLE_HTTPS" is turned on
# variable "ENABLE_HTTPS" is set to 1
endpoint = enable_https == "1" ? 'https://' + endpoint : 'http://' + endpoint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it possible to do

endpoint = ENV['ENABLE_HTTPS'] == "1" ? 'https://' + endpoint : 'http://' + endpoint

Is enable_https used anywhere?

Copy link
Collaborator Author

@ebozduman ebozduman Jul 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harsha,
It is already that way in the latest code. Maybe you saw it in the older version of the file.
Could you please recheck it?

@nitisht nitisht merged commit d7c7856 into minio:master Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants