-
Notifications
You must be signed in to change notification settings - Fork 50
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
Revamping the design. #7
Conversation
hackintoshrao
commented
Mar 10, 2017
- Categorizing tests across different folders based on their functionality.
- Adding root level run.sh to conditionally set env and help select which tests to run (Since Dockerfile cannot have conditional check this is necessary)
- Adding main.go which performs initial on whether Minio server is reachable and supplied credentials are right using admin API.
- Tests run on play by default.
- Load tests and debug tests will be the next category of tests with more test added in sdk-tests.
- Adding root run.sh and build.sh - run.sh runs all the tests, since Dockerfile doesnt conditional checks for options and env variables those checks are done in run.sh and relevant tests are run - main.go contain checks to see whether Minio server with given credentials are reachable. - By default with no env set the tests are run on play
- Add more comments. - Update Readme.md with more instructions.
- Add run instructions for functional test.
- Add `sync` command to avoid moby/moby#9547 - Fix path in build.sh
- Add functions in run.sh to execute different tests.
- Add functions in run.sh to execute different tests.
functional-test/README.md
Outdated
@@ -0,0 +1,17 @@ | |||
# Functional tests. | |||
Collection of tests with handcrafted http requests. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary.. space.
@@ -0,0 +1,36 @@ | |||
package main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add license header..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
main.go
Outdated
package main | ||
|
||
import ( | ||
"github.com/minio/minio/pkg/madmin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stdlib should proceed the imports
import {
"log"
"os"
"github.com/minio/minio/pkg/madmin"
}
@@ -0,0 +1,7 @@ | |||
#!/bin/sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add license header..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -0,0 +1,70 @@ | |||
#!/bin/sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add license header..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
run.sh
Outdated
|
||
# Fail if any of the commands exit with a non zero status. | ||
# Halt the further execution of the script if any of the programs fail. | ||
set -e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add new line after this for readability..
|
||
# Current tests | ||
- Minio-go functional test. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary space..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
# This is to avoid https://github.com/docker/docker/issues/9547 | ||
sync | ||
# run build | ||
./build.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was it decided to build during the run? each time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there will be no complex builds in the root on the project, we can just do go run main.go
here. But it was decided that each test category folder iwll have a build.sh and run.sh .
- Adding Licences. - Removing extra new lines. - fix import order in main.go
/* | ||
* Minio Cloud Storage, (C) 2017 Minio, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you even run this locally? - this will fail to run the script. @hackintoshrao
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works from the docker container. The path is relatively set to get it to work from the container. On using docker run
it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am talking about the comments @hackintoshrao :P