Skip to content

Commit

Permalink
Merge pull request #742 from grycap/devel
Browse files Browse the repository at this point in the history
Change tests to use only 1 pub ip
  • Loading branch information
micafer authored Dec 19, 2018
2 parents 0bbebfc + 22e892a commit 79a9f8a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 13 deletions.
24 changes: 23 additions & 1 deletion test/files/test_simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"id": "publica",
"outbound": "yes"
},
{
"class": "network",
"id": "privada"
},
{
"class": "system",
"cpu.arch": "x86_64",
Expand All @@ -14,11 +18,29 @@
"disk.0.os.name": "linux",
"id": "front",
"memory.size_min": 536870912,
"net_interface.0.connection": "publica"
"net_interface.0.connection": "publica",
"net_interface.1.connection": "privada"
},
{
"class": "system",
"cpu.arch": "x86_64",
"cpu.count_min": 1,
"disk.0.image.url": "one://ramses.i3m.upv.es/95",
"disk.0.os.credentials.password": "yoyoyo",
"disk.0.os.credentials.username": "ubuntu",
"disk.0.os.name": "linux",
"id": "wn",
"memory.size_min": 536870912,
"net_interface.0.connection": "privada"
},
{
"class": "deploy",
"system": "front",
"vm_number": 1
},
{
"class": "deploy",
"system": "wn",
"vm_number": 1
}
]
8 changes: 4 additions & 4 deletions test/files/tosca_add.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ topology_template:
protocol: tcp
source: 80
capabilities:
scalable:
properties:
count: 2
# Host container properties
host:
properties:
Expand Down Expand Up @@ -96,8 +93,11 @@ topology_template:
node: db_server

db_server:
type: tosca.nodes.Compute
type: tosca.nodes.indigo.Compute
capabilities:
scalable:
properties:
count: 2
# Host container properties
host:
properties:
Expand Down
10 changes: 5 additions & 5 deletions test/files/tosca_remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ topology_template:
protocol: tcp
source: 80
capabilities:
scalable:
properties:
count: 1
removal_list: ['2']
# Host container properties
host:
properties:
Expand Down Expand Up @@ -98,8 +94,12 @@ topology_template:
node: db_server

db_server:
type: tosca.nodes.Compute
type: tosca.nodes.indigo.Compute
capabilities:
scalable:
properties:
count: 1
removal_list: ['2']
# Host container properties
host:
properties:
Expand Down
6 changes: 3 additions & 3 deletions test/integration/TestREST_JSON.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
from radl.radl_json import parse_radl as parse_radl_json

PID = None
RADL_ADD = """[{"class":"network","reference":true,"id":"publica"},
{"class":"system","reference":true,"id":"front"},{"vm_number":1,"class":"deploy","system":"front"}]"""
RADL_ADD = """[{"class":"network","reference":true,"id":"privada"},
{"class":"system","reference":true,"id":"wn"},{"vm_number":1,"class":"deploy","system":"wn"}]"""
HOSTNAME = "localhost"
TEST_PORT = 8800

Expand Down Expand Up @@ -164,7 +164,7 @@ def test_40_addresource(self):
self.assertEqual(resp.status_code, 200,
msg="ERROR getting the infrastructure info:" + resp.text)
vm_ids = resp.text.split("\n")
self.assertEqual(len(vm_ids), 2, msg=("ERROR getting infrastructure info: Incorrect number of VMs(" +
self.assertEqual(len(vm_ids), 3, msg=("ERROR getting infrastructure info: Incorrect number of VMs(" +
str(len(vm_ids)) + "). It must be 2"))
all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 600)
self.assertTrue(
Expand Down

0 comments on commit 79a9f8a

Please sign in to comment.