Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
synnefo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
synnefo
Commits
6460f2eb
Commit
6460f2eb
authored
Dec 13, 2012
by
Christos Stavrakakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix current db, logic and api tests
parent
e90354cf
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1128 additions
and
1007 deletions
+1128
-1007
snf-cyclades-app/synnefo/api/tests.py
snf-cyclades-app/synnefo/api/tests.py
+688
-974
snf-cyclades-app/synnefo/db/fixtures/db_test_data.json
snf-cyclades-app/synnefo/db/fixtures/db_test_data.json
+27
-3
snf-cyclades-app/synnefo/db/tests.py
snf-cyclades-app/synnefo/db/tests.py
+0
-7
snf-cyclades-app/synnefo/logic/tests.py
snf-cyclades-app/synnefo/logic/tests.py
+413
-23
No files found.
snf-cyclades-app/synnefo/api/tests.py
View file @
6460f2eb
This diff is collapsed.
Click to expand it.
snf-cyclades-app/synnefo/db/fixtures/db_test_data.json
View file @
6460f2eb
[
{
"model"
:
"db.Backend"
,
"pk"
:
30000
,
"fields"
:
{
"clustername"
:
"test"
,
"port"
:
5080
,
"drained"
:
false
,
"index"
:
3
}
},
{
"model"
:
"db.Flavor"
,
"pk"
:
30000
,
...
...
@@ -17,6 +27,17 @@
"disk"
:
20
}
},
{
"model"
:
"db.Network"
,
"pk"
:
30000
,
"fields"
:
{
"subnet"
:
"10.0.0.0/24"
,
"gateway"
:
"10.0.0.1"
,
"flavor"
:
"IP_LESS_ROUTED"
,
"public"
:
true
,
"mac_prefix"
:
"aa:00:0"
}
},
{
"model"
:
"db.VirtualMachine"
,
"pk"
:
30000
,
...
...
@@ -27,7 +48,8 @@
"imageid"
:
"30000"
,
"hostid"
:
"HAL-9000"
,
"flavor"
:
30000
,
"operstate"
:
"STARTED"
"operstate"
:
"STARTED"
,
"backend"
:
30000
}
},
{
...
...
@@ -40,7 +62,8 @@
"imageid"
:
"30000"
,
"hostid"
:
"HAL-9000"
,
"flavor"
:
30000
,
"operstate"
:
"STOPPED"
"operstate"
:
"STOPPED"
,
"backend"
:
30000
}
},
{
...
...
@@ -53,7 +76,8 @@
"imageid"
:
"30000"
,
"hostid"
:
"HAL-9000"
,
"flavor"
:
30000
,
"operstate"
:
"BUILD"
"operstate"
:
"BUILD"
,
"backend"
:
30000
}
}
]
snf-cyclades-app/synnefo/db/tests.py
View file @
6460f2eb
...
...
@@ -45,13 +45,6 @@ class FlavorTestCase(TestCase):
"""Test a flavor object, its internal cost calculation and naming methods"""
flavor
=
Flavor
.
objects
.
get
(
pk
=
30000
)
# test current active/inactive costs
c_active
=
flavor
.
current_cost_active
c_inactive
=
flavor
.
current_cost_inactive
self
.
assertEqual
(
c_active
,
10
,
'flavor.cost_active should be 10! (%d)'
%
(
c_active
,))
self
.
assertEqual
(
c_inactive
,
5
,
'flavor.cost_inactive should be 5! (%d)'
%
(
c_inactive
,))
# test name property, should be C1R1024D10
f_name
=
flavor
.
name
...
...
snf-cyclades-app/synnefo/logic/tests.py
View file @
6460f2eb
This diff is collapsed.
Click to expand it.
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