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

Revamping the design. #7

Merged
merged 9 commits into from
Mar 10, 2017
Merged

Revamping the design. #7

merged 9 commits into from
Mar 10, 2017

Conversation

hackintoshrao
Copy link
Contributor

  • 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.

Karthic Rao added 7 commits March 8, 2017 13:08
- 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
- Fix play server address.
- Fix env variable for S3_ADDRESS in main.go
- Fix typo in dir name in run.sh
- 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.
@hackintoshrao
Copy link
Contributor Author

Fixes #6 and #5

- Add functions in run.sh to execute different tests.
@@ -0,0 +1,17 @@
# Functional tests.
Collection of tests with handcrafted http requests.

Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

Add license header..

Copy link
Contributor Author

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"
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

Add license header..

Copy link
Contributor Author

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
Copy link
Member

Choose a reason for hiding this comment

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

Add license header..

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary space..

Copy link
Contributor Author

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
Copy link
Member

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?

Copy link
Contributor Author

@hackintoshrao hackintoshrao Mar 10, 2017

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
@harshavardhana harshavardhana merged commit 46ffb0f into minio:master Mar 10, 2017
/*
* Minio Cloud Storage, (C) 2017 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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

This was referenced Mar 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

2 participants