This repository has been archived by the owner on Jul 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #760 from markdryan/master
Rewrite BAT tests in GO
- Loading branch information
Showing
11 changed files
with
1,131 additions
and
1,004 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# BAT tests | ||
|
||
This folder contains a set of BAT tests. Each set of tests validates a specific | ||
part of ciao, such as storage, and is implemented by a separate go package in one of | ||
the following sub folders. | ||
|
||
``` | ||
. | ||
├── base - Basic tests that verify that the cluster is functional | ||
``` | ||
|
||
The tests are implemented using the go testing framework. This is convenient | ||
as this framework is used for ciao's unit tests and so is already familiar | ||
to ciao developers, it requires no additional dependencies and it works with ciao's | ||
existing test case runner, test-cases. | ||
|
||
# A Short Guide to Running the BAT Tests | ||
|
||
## Set up | ||
|
||
The BAT tests require that certain environment variables have been set before they | ||
can be run: | ||
|
||
* "CIAO_IDENTITY" - the URL and port number of your identity service | ||
* "CIAO_CONTROLLER" - the URL and port number of the ciao compute service | ||
* "CIAO_USERNAME" - a test user with user level access to a test tenant | ||
* "CIAO_PASSWORD" - your test user's password | ||
* "CIAO_ADMIN_USERNAME" - your cluster admin user name | ||
* "CIAO_ADMIN_PASSWORD" - your cluster admin password. | ||
|
||
## Running all the BAT tests | ||
|
||
``` | ||
# cd $GOPATH/src/github.com/01org/ciao/_release/bat | ||
# go test -v ./... | ||
``` | ||
|
||
## Run the BAT Tests and Generate a Pretty Report | ||
|
||
``` | ||
# cd $GOPATH/src/github.com/01org/ciao/_release/bat | ||
# test-cases ./... | ||
``` | ||
|
||
## Run the BAT Tests and Generate TAP report | ||
|
||
``` | ||
# cd $GOPATH/src/github.com/01org/ciao/_release/bat | ||
# test-cases -format tap ./... | ||
``` | ||
|
||
## Run the BAT Tests and Generate a Test Plan | ||
|
||
``` | ||
# cd $GOPATH/src/github.com/01org/ciao/_release/bat | ||
# test-cases -format html ./... | ||
``` | ||
|
||
## Run a Single Set of Tests | ||
|
||
``` | ||
# cd $GOPATH/src/github.com/01org/ciao/_release/bat | ||
# go test -v github.com/01org/ciao/_release/bat/base | ||
``` | ||
|
||
## Run a Single Test | ||
|
||
``` | ||
# cd $GOPATH/src/github.com/01org/ciao/_release/bat | ||
# go test -v -run TestGetAllInstances ./... | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// Copyright (c) 2016 Intel Corporation | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
// base is a placeholder package for the basic BAT tests. | ||
package base |
Oops, something went wrong.