Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chenhao Ma
core
Commits
5cd0ca7e
Commit
5cd0ca7e
authored
7 years ago
by
Ambrus Simon
Browse files
Options
Downloads
Patches
Plain Diff
fix abao tests: do not rely on analyses attr in "GET /{Container}" (get_all) response
parent
d6780ba5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/integration_tests/abao/abao_test_hooks.js
+31
-0
31 additions, 0 deletions
test/integration_tests/abao/abao_test_hooks.js
with
31 additions
and
0 deletions
test/integration_tests/abao/abao_test_hooks.js
+
31
−
0
View file @
5cd0ca7e
...
...
@@ -347,6 +347,8 @@ hooks.before("GET /groups/{GroupId}/projects -> 200", function(test, done) {
done
();
});
// set initial test_collection_1
hooks
.
after
(
"
GET /collections -> 200
"
,
function
(
test
,
done
)
{
test_collection_1
=
test
.
response
.
body
[
0
];
collection_id
=
test
.
response
.
body
[
0
].
_id
;
...
...
@@ -359,6 +361,12 @@ hooks.before("GET /collections/{CollectionId} -> 200", function(test, done) {
done
();
});
// set detailed test_collection_1 (including analyses, that are omitted during listing)
hooks
.
after
(
"
GET /collections/{CollectionId} -> 200
"
,
function
(
test
,
done
)
{
test_collection_1
=
test
.
response
.
body
;
done
();
});
hooks
.
before
(
"
GET /collections/{CollectionId}/sessions -> 200
"
,
function
(
test
,
done
)
{
test
.
request
.
params
.
CollectionId
=
collection_id
;
done
();
...
...
@@ -636,6 +644,8 @@ hooks.before("DELETE /collections/{CollectionId}/analyses/{AnalysisId}/notes/{No
done
();
});
// set initial test_session_1
hooks
.
after
(
"
GET /sessions -> 200
"
,
function
(
test
,
done
)
{
test_session_1
=
test
.
response
.
body
[
0
];
assert
.
equal
(
test_session_1
.
label
,
"
test-session-1
"
);
...
...
@@ -647,6 +657,12 @@ hooks.before("GET /sessions/{SessionId} -> 200", function(test, done) {
done
();
});
// set detailed test_session_1 (including analyses, that are omitted during listing)
hooks
.
after
(
"
GET /sessions/{SessionId} -> 200
"
,
function
(
test
,
done
)
{
test_session_1
=
test
.
response
.
body
;
done
();
});
hooks
.
after
(
"
GET /sessions/{SessionId} -> 200
"
,
function
(
test
,
done
)
{
test_session_1
=
test
.
response
.
body
;
assert
.
equal
(
test_session_1
.
label
,
"
test-session-1
"
);
...
...
@@ -899,6 +915,7 @@ hooks.before("DELETE /sessions/{SessionId}/analyses/{AnalysisId}/notes/{NoteId}
// set initial test_acquisition_1
hooks
.
after
(
"
GET /acquisitions -> 200
"
,
function
(
test
,
done
)
{
test_acquisition_1
=
test
.
response
.
body
[
0
];
assert
.
equal
(
test_acquisition_1
.
label
,
"
test-acquisition-1
"
);
...
...
@@ -910,6 +927,12 @@ hooks.before("GET /acquisitions/{AcquisitionId} -> 200", function(test, done) {
done
();
});
// set detailed test_acquisition_1 (including analyses, that are omitted during listing)
hooks
.
after
(
"
GET /acquisitions/{AcquisitionId} -> 200
"
,
function
(
test
,
done
)
{
test_acquisition_1
=
test
.
response
.
body
;
done
();
});
hooks
.
before
(
"
POST /acquisitions -> 200
"
,
function
(
test
,
done
)
{
test
.
request
.
body
.
session
=
test_session_1
.
_id
;
done
();
...
...
@@ -1137,6 +1160,8 @@ hooks.before("DELETE /acquisitions/{AcquisitionId}/analyses/{AnalysisId}/notes/{
done
();
});
// set initial test_project_1
hooks
.
after
(
"
GET /projects -> 200
"
,
function
(
test
,
done
)
{
test_project_1
=
test
.
response
.
body
[
0
];
assert
.
equal
(
test_project_1
.
label
,
"
test-project-1
"
);
...
...
@@ -1158,6 +1183,12 @@ hooks.before("GET /projects/{ProjectId} -> 200", function(test, done) {
done
();
});
// set detailed test_project_1 (including analyses, that are omitted during listing)
hooks
.
after
(
"
GET /projects/{ProjectId} -> 200
"
,
function
(
test
,
done
)
{
test_project_1
=
test
.
response
.
body
;
done
();
});
hooks
.
before
(
"
PUT /projects/{ProjectId} -> 400
"
,
function
(
test
,
done
)
{
test
.
request
.
params
.
ProjectId
=
test_project_1
.
_id
;
test
.
request
.
body
=
{
"
not_real
"
:
"
fake property
"
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment