Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 85c8972

Browse files
author
earthmant
committed
adding 1853 test
1 parent 4d72770 commit 85c8972

5 files changed

Lines changed: 98 additions & 37 deletions

File tree

.circleci/config.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@ jobs:
3939
command: pip install cloudify==4.3.2
4040
- run:
4141
name: install test requirements
42-
command: pip install nose https://github.com/cloudify-incubator/cloudify-awssdk-plugin/archive/2.3.4.zip https://github.com/cloudify-cosmo/cloudify-fabric-plugin/archive/1.5.1.zip https://github.com/cloudify-incubator/cloudify-utilities-plugin/archive/1.7.1.zip https://github.com/cloudify-incubator/cloudify-ecosystem-test/archive/2.1.zip
42+
command: pip install nose https://github.com/cloudify-incubator/cloudify-awssdk-plugin/archive/2.3.4.zip https://github.com/cloudify-cosmo/cloudify-fabric-plugin/archive/1.5.1.zip https://github.com/cloudify-incubator/cloudify-utilities-plugin/archive/1.7.1.zip https://github.com/cloudify-incubator/cloudify-ecosystem-test/archive/2.1.1.zip
4343
- run:
44-
name: execute test
45-
command: nosetests -s tests/test_aws.py
44+
name: test 4.3.2
45+
command: nosetests -s tests/test_aws.py:TestAWS432
46+
- run:
47+
name: test 18.5.3
48+
command: nosetests -s tests/test_aws.py:TestAWS1853
4649

4750
azure:
4851
docker:
@@ -72,10 +75,13 @@ jobs:
7275
command: pip install cloudify==4.3.2
7376
- run:
7477
name: install test requirements
75-
command: pip install nose https://github.com/cloudify-incubator/cloudify-azure-plugin/archive/1.7.2.zip https://github.com/cloudify-cosmo/cloudify-fabric-plugin/archive/1.5.1.zip https://github.com/cloudify-incubator/cloudify-utilities-plugin/archive/1.7.1.zip https://github.com/cloudify-incubator/cloudify-ecosystem-test/archive/2.1.zip
78+
command: pip install nose https://github.com/cloudify-incubator/cloudify-azure-plugin/archive/1.7.2.zip https://github.com/cloudify-cosmo/cloudify-fabric-plugin/archive/1.5.1.zip https://github.com/cloudify-incubator/cloudify-utilities-plugin/archive/1.7.1.zip https://github.com/cloudify-incubator/cloudify-ecosystem-test/archive/2.1.1.zip
79+
- run:
80+
name: test 4.3.2
81+
command: nosetests -s tests/test_azure.py:TestAzure432
7682
- run:
77-
name: execute test
78-
command: nosetests -s tests/test_azure.py
83+
name: test 18.5.3
84+
command: nosetests -s tests/test_azure.py:TestAzure1853
7985

8086
gcp:
8187
docker:
@@ -105,10 +111,13 @@ jobs:
105111
command: pip install cloudify==4.3.2
106112
- run:
107113
name: install test requirements
108-
command: pip install nose https://github.com/cloudify-cosmo/cloudify-gcp-plugin/archive/1.4.3.zip https://github.com/cloudify-cosmo/cloudify-fabric-plugin/archive/1.5.1.zip https://github.com/cloudify-incubator/cloudify-utilities-plugin/archive/1.7.1.zip https://github.com/cloudify-incubator/cloudify-ecosystem-test/archive/2.1.zip
114+
command: pip install nose https://github.com/cloudify-cosmo/cloudify-gcp-plugin/archive/1.4.3.zip https://github.com/cloudify-cosmo/cloudify-fabric-plugin/archive/1.5.1.zip https://github.com/cloudify-incubator/cloudify-utilities-plugin/archive/1.7.1.zip https://github.com/cloudify-incubator/cloudify-ecosystem-test/archive/2.1.1.zip
115+
- run:
116+
name: test 4.3.2
117+
command: nosetests -s tests/test_gcp.py:TestGCP432
109118
- run:
110-
name: execute test
111-
command: nosetests -s tests/test_gcp.py
119+
name: test 18.5.3
120+
command: nosetests -s tests/test_gcp.py:TestGCP1853
112121

113122
workflows:
114123
version: 2

tests/__init__.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,44 @@ def cloudify_rpm_url(self):
4444
return 'http://repository.cloudifysource.org/cloudify/' \
4545
'4.3.2/ga-release/cloudify-manager-install-4.3.2ga.rpm'
4646

47+
@property
48+
def sensitive_data(self):
49+
50+
# We need to try returning all of these because
51+
# we have some common tests in this class.
52+
53+
try:
54+
55+
return [
56+
os.environ['AWS_SECRET_ACCESS_KEY'],
57+
os.environ['AWS_ACCESS_KEY_ID']
58+
]
59+
except KeyError:
60+
pass
61+
62+
try:
63+
return [
64+
os.environ['GCP_CERT_URL'],
65+
os.environ['GCP_EMAIL'],
66+
os.environ['GCP_CLIENT_ID'],
67+
os.environ['GCP_PRIVATE_PROJECT_ID'],
68+
os.environ['GCP_PRIVATE_KEY_ID'],
69+
os.environ['GCP_PRIVATE_KEY'],
70+
os.environ['GCP_PRIVATE_KEY'].decode('string_escape')
71+
]
72+
except KeyError:
73+
pass
74+
75+
try:
76+
return [
77+
os.environ['AZURE_SUB_ID'],
78+
os.environ['AZURE_TEN_ID'],
79+
os.environ['AZURE_CLI_ID'],
80+
os.environ['AZURE_CLI_SE']
81+
]
82+
except KeyError:
83+
raise
84+
4785
def test_secrets(self):
4886
for secret in self.secrets_to_check:
4987
self.assertIsNotNone(eco_utils.get_secrets(secret))

tests/test_aws.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
13
from . import EnvironmentSetupTestBase, eco_utils
24

35

@@ -6,7 +8,7 @@ class AWSTestbase(EnvironmentSetupTestBase):
68
def setUp(self):
79
os.environ['AWS_DEFAULT_REGION'] = \
810
self.inputs.get('ec2_region_name')
9-
super(TestAWS432, self).setUp()
11+
super(AWSTestbase, self).setUp()
1012

1113
@property
1214
def node_type_prefix(self):
@@ -28,13 +30,6 @@ def external_id_key(self):
2830
def server_ip_property(self):
2931
return 'ip'
3032

31-
@property
32-
def sensitive_data(self):
33-
return [
34-
os.environ['AWS_SECRET_ACCESS_KEY'],
35-
os.environ['AWS_ACCESS_KEY_ID']
36-
]
37-
3833
@property
3934
def inputs(self):
4035
try:
@@ -82,3 +77,11 @@ def test_network_deployment(self):
8277

8378
class TestAWS432(AWSTestbase):
8479
pass
80+
81+
class TestAWS1853(AWSTestbase):
82+
83+
@property
84+
def cloudify_rpm_url(self):
85+
return 'http://repository.cloudifysource.org/cloudify/' \
86+
'18.5.3/community-release/' \
87+
'cloudify-manager-install-community-18.5.3.rpm'

tests/test_azure.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
13
from . import EnvironmentSetupTestBase, eco_utils
24

35

@@ -23,15 +25,6 @@ def external_id_key(self):
2325
def server_ip_property(self):
2426
return 'cloudify_host'
2527

26-
@property
27-
def sensitive_data(self):
28-
return [
29-
os.environ['AZURE_SUB_ID'],
30-
os.environ['AZURE_TEN_ID'],
31-
os.environ['AZURE_CLI_ID'],
32-
os.environ['AZURE_CLI_SE']
33-
]
34-
3528
@property
3629
def inputs(self):
3730
try:
@@ -106,3 +99,11 @@ def test_network_deployment(self):
10699

107100
class TestAzure432(AzureTestBase):
108101
pass
102+
103+
class TestAzure1853(AzureTestBase):
104+
105+
@property
106+
def cloudify_rpm_url(self):
107+
return 'http://repository.cloudifysource.org/cloudify/' \
108+
'18.5.3/community-release/' \
109+
'cloudify-manager-install-community-18.5.3.rpm'

tests/test_gcp.py

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
import os
2+
13
from . import EnvironmentSetupTestBase, eco_utils
24

35

46
class GCPTestBase(EnvironmentSetupTestBase):
57

8+
@classmethod
9+
def tearDownClass(cls):
10+
eco_utils.execute_command(
11+
'cfy profiles delete {0}'.format(
12+
os.environ['ECOSYSTEM_SESSION_MANAGER_IP']))
13+
super(GCPTestBase, cls).tearDownClass()
14+
615
@property
716
def node_type_prefix(self):
817
return 'cloudify.gcp.nodes'
@@ -23,17 +32,6 @@ def external_id_key(self):
2332
def server_ip_property(self):
2433
return 'cloudify_host'
2534

26-
@property
27-
def sensitive_data(self):
28-
return [
29-
os.environ['GCP_CERT_URL'],
30-
os.environ['GCP_EMAIL'],
31-
os.environ['GCP_CLIENT_ID'],
32-
os.environ['GCP_PRIVATE_PROJECT_ID'],
33-
os.environ['GCP_PRIVATE_KEY_ID'],
34-
os.environ['GCP_PRIVATE_KEY'].decode('string_escape')
35-
]
36-
3735
@property
3836
def inputs(self):
3937
try:
@@ -97,6 +95,9 @@ def test_network_deployment(self):
9795
'resource_suffix': self.application_prefix
9896
}
9997
self.addCleanup(self.cleanup_deployment, 'gcp-example-network')
98+
# eco_utils.execute_command(
99+
# 'cfy secrets update gcp_private_key -s {0}'.format(
100+
# os.environ['GCP_PRIVATE_KEY']))
100101
# Create Deployment (Blueprint already uploaded.)
101102
if eco_utils.create_deployment(
102103
'gcp-example-network',
@@ -113,3 +114,12 @@ def test_network_deployment(self):
113114

114115
class TestGCP432(GCPTestBase):
115116
pass
117+
118+
119+
class TestGCP1853(GCPTestBase):
120+
121+
@property
122+
def cloudify_rpm_url(self):
123+
return 'http://repository.cloudifysource.org/cloudify/' \
124+
'18.5.3/community-release/' \
125+
'cloudify-manager-install-community-18.5.3.rpm'

0 commit comments

Comments
 (0)