Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
efb190d5
Commit
efb190d5
authored
May 04, 2015
by
Chris Meyers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add azure integration tests
parent
61ec84ef
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
0 deletions
+85
-0
test/integration/azure.yml
+7
-0
test/integration/cleanup_azure.py
+1
-0
test/integration/credentials.template
+4
-0
test/integration/roles/test_azure/defaults/main.yml
+10
-0
test/integration/roles/test_azure/tasks/main.yml
+63
-0
No files found.
test/integration/azure.yml
0 → 100644
View file @
efb190d5
-
hosts
:
localhost
connection
:
local
gather_facts
:
no
tags
:
-
test_azure
roles
:
-
{
role
:
test_azure
}
test/integration/cleanup_azure.py
0 → 100644
View file @
efb190d5
test/integration/credentials.template
View file @
efb190d5
...
@@ -13,5 +13,9 @@ service_account_email:
...
@@ -13,5 +13,9 @@ service_account_email:
pem_file:
pem_file:
project_id:
project_id:
# Azure Credentials
azure_subscription_id:
azure_cert_path:
# GITHUB SSH private key - a path to a SSH private key for use with github.com
# GITHUB SSH private key - a path to a SSH private key for use with github.com
github_ssh_private_key: "{{ lookup('env','HOME') }}/.ssh/id_rsa"
github_ssh_private_key: "{{ lookup('env','HOME') }}/.ssh/id_rsa"
test/integration/roles/test_azure/defaults/main.yml
0 → 100644
View file @
efb190d5
---
# defaults file for test_azure
instance_name
:
"
{{
resource_prefix|lower
}}"
cert_path
:
"
{{
azure_cert_path
}}"
subscription_id
:
"
{{
azure_subscription_id
}}"
storage_account
:
"
{{
azure_storage_account|default('ansibleeast')
}}"
role_size
:
"
{{
azure_role_size|default('Basic_A0')
}}"
user
:
"
{{
azure_user|default('ansible_user')
}}"
location
:
"
{{
azure_location|default('East
US')
}}"
password
:
"
{{
azure_password|default('abc123Q%')
}}"
test/integration/roles/test_azure/tasks/main.yml
0 → 100644
View file @
efb190d5
# TODO: Implement create storage account feature. Currently, storage_account must be manually created on azure account.
# TODO: When more granular azure operations are implemented (i.e. list disk, list cloud services, etc). Use the
# fine-grain listings to ensure higher level operations are performed.
# ============================================================
-
name
:
test with no credentials
azure
:
register
:
result
ignore_errors
:
true
-
name
:
assert failure when called with no credentials
assert
:
that
:
-
'
result.failed'
-
'
result.msg
==
"No
subscription_id
provided.
Please
set
'
'
AZURE_SUBSCRIPTION_ID'
'
or
use
the
'
'
subscription_id'
'
parameter"'
# ============================================================
-
name
:
test credentials
azure
:
subscription_id
:
"
{{
subscription_id
}}"
management_cert_path
:
"
{{
cert_path
}}"
register
:
result
ignore_errors
:
true
-
name
:
assert failure when called with credentials and no parameters
assert
:
that
:
-
'
result.failed'
-
'
result.msg
==
"name
parameter
is
required
for
new
instance"'
# ============================================================
-
name
:
test status=Running (expected changed=true)
azure
:
subscription_id
:
"
{{
subscription_id
}}"
management_cert_path
:
"
{{
cert_path
}}"
name
:
"
{{
instance_name
}}"
image
:
"
b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-12_04_4-LTS-amd64-server-20140514-en-us-30GB"
storage_account
:
"
{{
storage_account
}}"
user
:
"
{{
user
}}"
role_size
:
"
{{
role_size
}}"
password
:
"
{{
password
}}"
location
:
"
{{
location
}}"
wait
:
yes
state
:
present
register
:
result
-
name
:
assert state=Running (expected changed=true)
assert
:
that
:
-
'
result.changed'
-
'
result.deployment.name
==
"{{
instance_name
}}"'
-
'
result.deployment.status
==
"Running"'
# ============================================================
-
name
:
test state=absent (expected changed=true)
azure
:
subscription_id
:
"
{{
subscription_id
}}"
management_cert_path
:
"
{{
cert_path
}}"
name
:
"
{{
instance_name
}}"
#storage_account: "{{ storage_account }}"
#location: "{{ location }}"
wait
:
yes
state
:
absent
register
:
result
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