caicloud / aloe Goto Github PK
View Code? Open in Web Editor NEWDeclarative API test framework based on ginkgo and gomega
License: Apache License 2.0
Declarative API test framework based on ginkgo and gomega
License: Apache License 2.0
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind bug
/kind feature
/kind feature
What happened:
Now test case can not be selected, all test cases should be run every time
What you expected to happen:
e.g.
go test --skip "time=slow"
go test --pick "type=get"
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
• Failure [100.219 seconds]
/Users/admin/go/src/github.com/caicloud/tenant-admin/vendor/github.com/caicloud/aloe/framework.go:48
create.yaml: Test create a partition eventually create corresponding namespace and quota [It]
/Users/admin/go/src/github.com/caicloud/tenant-admin/vendor/github.com/caicloud/aloe/framework.go:84
Timed out after 100.001s.
Expected
<string>:
to match response: {
status code is not matched, expected: 200, actual: 404
api status: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"resourcequotas \"test-partition-123\" not found","reason":"NotFound","details":{"name":"test-partition-123","kind":"resourcequotas"},"code":404}
}
should be print api real response when test fail
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind bug
/kind feature
What happened:
Call function in template is supported(e.g. ${ random(`regexp`) }
) but the code is mess
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
/kind feature
What happened:
my test workflow:
1.user login return token
2.get the token for next request
my body struct :
{
"success": true,
"code": 0,
"msg": "",
"data": {
"uid": 1000007,
"login_name": "86:15810362016:3",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NjgxMTYzNDEsImlzcyI6IkRpMjMwOXNsa2Q5OGE5OGFkaWFzZGxmMDlzZGdka2YyMWtqZ3Nka2YiLCJ1aWQiOjEwMDAwMDd9.VOLfK19uaRJuldeVPVe2wndpSZm1tpCxP65CRNUgyUk"
}
}
What you expected to happen:
I want to set the token to definition.
how can i set ?
What is the issue about:
What happened:
What you expected to happen:
Anything else we need to know:
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind bug
/kind feature
/kind feature
What happened:
Sometimes we need to call API of different hosts with different tls config
What you expected to happen:
Different tls configs for different cases should be supported.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Something else like tls config in http.Client also need to be supported.
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own
/kind feature
What happened:
sometimes a random string or int is needed to generate different context
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Is this a BUG REPORT or FEATURE REQUEST?:
/kind feature
What happened:
flow:
- description: "Get user info in info.yaml"
request:
api: GET /user
headers:
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NjY0NTgxNjAsImlzcyI6IkRpMjMwOXNsa2Q5OGE5OGFkaWFzZGxmMDlzZGdka2YyMWtqZ3Nka2YiLCJ1aWQiOjEwMDAwMDd9.Xff-abmUDYejaGMKI5r1gBEUSeLYu5ARboAAcjoEZ2g"
response:
statusCode: 200
What you expected to happen:
Acture result
statusCode:400
Anything else we need to know?:
Is my headers set right or not?
req, err := http.NewRequest(method, "http://"+c.host+path, body)
now request hardcode in framework
i afraid my testcases not executed
➜ test git:(e2e_testcases) ✗ go test -v
=== RUN TestPartitionAPI
Running Suite: API Suite
========================
Random Seed: 1514432621
Will run 1 of 1 specs
clean successfully
•
Ran 1 of 1 Specs in 0.267 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped --- PASS: TestPartitionAPI (0.27s)
PASS
ok github.com/caicloud/tenant-admin/test 0.350s
expected or advice:
StatusCode is 404, expected is 200
actual:
StatusCode is 404
optional messages:
(log, picture, or anything else)
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind feature
What happened:
round trip flow should support condition and loop control
What you expected to happen:
when
loop
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind bug
/kind feature
What happened:
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind bug
/kind feature
/kind feature
What happened:
Now only one clean function can be used to clean up context
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
use cases:
when i list partition, this should be items
, but follow testcases run successfully.
- description: "Try get partition eventually status"
request:
api: GET /api/v1/proxy/namespaces/default/services/tenant-admin:8080/apis/tenant.caicloud.io/v1alpha1/clusters/84984e39-57a7-4b8f-955e-127da0e46427/partitions
headers:
"Content-Type": "application/json"
body: |
{
"spec":{
"quota":{
"limits.cpu":"10m",
"limits.memory":"10Mi",
"requests.cpu":"10m",
"requests.memory":"10Mi"
},
"tenant":"test-1234"
},
"status":{
"conditions":[
{
"status":"False",
"type":"ExceedsQuota"
}
],
"hard":{
"limits.cpu":"10m",
"limits.memory":"180Mi",
"requests.cpu":"10m",
"requests.memory":"10Mi"
},
"phase":"Active",
"used":{
"limits.cpu":"0",
"limits.memory":"0",
"requests.cpu":"0",
"requests.memory":"0"
}
}
}
response:
statusCode: 200
eventually:
timeout: "60s"
interval: "1s"```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.