Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos.core
Commits
53cefc00
Commit
53cefc00
authored
Jul 13, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop test for removed functionality.
parent
6b0217a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
110 deletions
+1
-110
master/bt5/vifib_slapos_rest_api_v1_test/TestTemplateItem/portal_components/testVifibSlaposRestAPIV1.py
...emplateItem/portal_components/testVifibSlaposRestAPIV1.py
+0
-109
master/bt5/vifib_slapos_rest_api_v1_test/bt/revision
master/bt5/vifib_slapos_rest_api_v1_test/bt/revision
+1
-1
No files found.
master/bt5/vifib_slapos_rest_api_v1_test/TestTemplateItem/portal_components/testVifibSlaposRestAPIV1.py
View file @
53cefc00
...
...
@@ -1287,115 +1287,6 @@ class TestInstanceGETlist(VifibSlaposRestAPIV1InstanceMixin):
self
.
assertTrue
(
'Bearer realm="'
in
auth
)
self
.
assertPersonRequestSimulatorEmpty
()
class
TestGET_discovery
(
VifibSlaposRestAPIV1Mixin
):
def
afterSetUp
(
self
):
super
(
TestGET_discovery
,
self
).
afterSetUp
()
self
.
api_date
=
self
.
portal
.
portal_vifib_rest_api_v1
.
api_modification_date
def
assertLastModifiedHeader
(
self
):
self
.
assertEqual
(
rfc1123_date
(
self
.
api_date
),
self
.
response
.
getheader
(
'Last-Modified'
))
def
assertAPIDiscoveryDict
(
self
):
self
.
assertSameSet
(
self
.
json_response
.
keys
(),
[
'computer_update'
,
'instance_certificate'
,
'request_instance'
,
'instance_list'
,
'instance_edit'
,
'instance_bang'
,
'instance_info'
,
'discovery'
,
])
@
skip
(
"Temporary disabled to reduce error numbers in global tests"
)
def
test_noAcquisition
(
self
):
# check the test
portal_id
=
self
.
portal
.
getId
()
self
.
logout
()
self
.
assertEqual
(
portal_id
,
self
.
portal
.
getId
())
self
.
login
()
# prove that even if anyone has access to portal root it is impossible
# to fetch it via API
self
.
connection
.
request
(
method
=
'GET'
,
url
=
'/'
.
join
([
self
.
api_path
,
self
.
portal
.
getId
(),
'getId'
])
)
self
.
prepareResponse
()
self
.
assertResponseCode
(
404
)
self
.
assertBasicResponse
()
@
skip
(
"Temporary disabled to reduce error numbers in global tests"
)
def
test
(
self
):
self
.
connection
.
request
(
method
=
'GET'
,
url
=
self
.
api_path
)
self
.
prepareResponse
()
self
.
assertBasicResponse
()
self
.
assertResponseCode
(
200
)
self
.
assertLastModifiedHeader
()
self
.
assertCacheControlHeader
()
self
.
assertResponseJson
()
self
.
assertAPIDiscoveryDict
()
def
test_if_modified_since_equal
(
self
):
self
.
connection
.
request
(
method
=
'GET'
,
url
=
self
.
api_path
,
headers
=
{
'If-Modified-Since'
:
rfc1123_date
(
self
.
api_date
)})
self
.
prepareResponse
()
self
.
assertBasicResponse
()
self
.
assertResponseCode
(
304
)
@
skip
(
"Temporary disabled to reduce error numbers in global tests"
)
def
test_if_modified_since_after
(
self
):
if_modified
=
self
.
api_date
.
timeTime
()
+
2
# check the test: is calculated time *before* now?
self
.
assertTrue
(
int
(
if_modified
)
<
int
(
DateTime
().
timeTime
()))
self
.
connection
.
request
(
method
=
'GET'
,
url
=
self
.
api_path
,
headers
=
{
'If-Modified-Since'
:
rfc1123_date
(
DateTime
(
if_modified
))})
self
.
prepareResponse
()
self
.
assertBasicResponse
()
self
.
assertResponseCode
(
304
)
@
skip
(
"Temporary disabled to reduce error numbers in global tests"
)
def
test_if_modified_since_before
(
self
):
self
.
connection
.
request
(
method
=
'GET'
,
url
=
self
.
api_path
,
headers
=
{
'If-Modified-Since'
:
rfc1123_date
(
self
.
api_date
-
1
)})
self
.
prepareResponse
()
self
.
assertBasicResponse
()
self
.
assertResponseCode
(
200
)
self
.
assertLastModifiedHeader
()
self
.
assertCacheControlHeader
()
self
.
assertResponseJson
()
self
.
assertAPIDiscoveryDict
()
def
test_if_modified_since_date_not_date
(
self
):
self
.
connection
.
request
(
method
=
'GET'
,
url
=
self
.
api_path
,
headers
=
{
'If-Modified-Since'
:
'This Is Not A date'
})
self
.
prepareResponse
()
self
.
assertBasicResponse
()
self
.
assertResponseCode
(
200
)
self
.
assertLastModifiedHeader
()
self
.
assertCacheControlHeader
()
self
.
assertResponseJson
()
self
.
assertAPIDiscoveryDict
()
@
skip
(
"Temporary disabled to reduce error numbers in global tests"
)
def
test_if_modified_since_date_future
(
self
):
self
.
connection
.
request
(
method
=
'GET'
,
url
=
self
.
api_path
,
headers
=
{
'If-Modified-Since'
:
rfc1123_date
(
DateTime
()
+
1
)})
self
.
prepareResponse
()
self
.
assertBasicResponse
()
self
.
assertResponseCode
(
200
)
self
.
assertLastModifiedHeader
()
self
.
assertCacheControlHeader
()
self
.
assertResponseJson
()
self
.
assertAPIDiscoveryDict
()
class
TestComputerPUT
(
VifibSlaposRestAPIV1MixinBase
):
def
createComputer
(
self
):
computer
=
self
.
cloneByPath
(
...
...
master/bt5/vifib_slapos_rest_api_v1_test/bt/revision
View file @
53cefc00
70
\ No newline at end of file
71
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment