Commit Graph

2212 Commits

Author SHA1 Message Date
LoveIsGrief
bb6ffa80e2 from ... import ... on top for lint?
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-12 14:08:45 +01:00
LoveIsGrief
3cd04cbccc Remove unused function
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-12 12:35:32 +01:00
Mike Place
52f6887124 Lint 2016-02-11 13:52:59 -07:00
LoveIsGrief
4eab39e9ca Attempt to fix pylint errors and warnings
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-11 13:56:38 +01:00
LoveIsGrief
17735df82d Move risky event into try/except
It might leave the test env in a dirty state, maybe further tests might fail, but we have the log to trace it back to that

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:53:21 +01:00
LoveIsGrief
e5f8227e90 Move @skipIf to parent classes
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:37 +01:00
LoveIsGrief
54db49b843 Remove some TODOs
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:37 +01:00
LoveIsGrief
53c7cd87ca When creating a machine return a dict
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
95ab35203d Redtest to stop and restart a machine multiple times
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
6cfb447cff Introduce profiles for testing
* virtualbox-deploy-conf won't deploy a script
* virtualbox-minion will do a full deploy with a minion config

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
1a8cd747c5 Feature: deploy salt on machine when creating
We need to setup the tests with a profile that wants to deploy and use the profile

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
7b4142dff3 Improve output JSON interpretation cleaning for tests
(Actually also fix it because we we popping increasing random elements from the output... not good)

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
63edda4b50 New function for ip addresses
Waits on the guest to have one.

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
f56d72b69f Helper functions should do what they are named for
New helpers also added to describe the state of the machine

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
ef24a16f4e Remove unneeded test
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
7c4b3580f1 Try and stop the running VM as a cleanup
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
1d6b94c279 Starting machines works now too
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
8111dcb092 Force actions in tests
Otherwise there is always a confirmation prompt... ain't nobody got time fo' dat!

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
59d212acb1 Provider is getting deprecated in the config
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
04c3bae44f Move some common test functions to helpers
Introduce stop machine test (it's red :( )

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
1b3d96fa9f First test to get network address from already running guest
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
b195d0f1a7 Use dict output for VirtualboxTests
This should make the output from salt-cloud more verifiable and make tests more reliable

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
13d49278f0 A little PEP8 cleaning
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
b0752a3d82 Implement list_nodes_select
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
3b052215e2 Implement function show_image
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
a1c94bf01b Red-test: list_nodes_full
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
f4386c9be1 Tests and templates for starting and stopping VMs
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
8c7e885537 Improve the output of list_nodes
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
abf139a531 Output the default information expected for list_nodes
This still needs to be enriched

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
20b574abef Improve XPCOM to dict conversion
Allow passing tuples of attributes and their default values in case they don't exist in the xpcom object

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
2439d61b02 Improve XPCOM to dict conversion
We will need this in the future when listing machines and requesting attributes that don't exist (yet)

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
ec50b5ca51 Remove list_available_images
Following a discussion about it, the function just doesn't apply to virtualbox
virtalbox doesn't have a concept of "templates" so we can't list them

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
f4094ae320 Implement instance destruction
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
38526b2c51 Move virtualbox functions to their own utility module
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
00229e200c List all available images in virtualbox
Does virtualbox have templates?

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
16f44f425b move vbox to its own function
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
3a27c9bbf6 Check existence without an exception
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
14b5e9b7b9 Test creating a virtual machine with salt-cloud
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
8009f3bc16 Unit tests for xpcomt to dict conversion
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
df789aeeec Use the constants for testing
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
50c36b02da Set default log level to INFO
Fix log lines

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
459eaa8945 More rigorous setup precautions for tests
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
2342940f64 Remove unnecessary import
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
98ad2cbe71 Add virtualbox to profile checks
Virtualbox needs the 'clonefrom' property and it doesn't need size

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
1995b9ad14 PEP8 docstrings
double quotes instead of single quotes

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:11 +01:00
LoveIsGrief
1545c9de7f Setup testing for calls to salt-cloud
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:11 +01:00
LoveIsGrief
4a1a6a962f Move around files for clarity and separation
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:11 +01:00
LoveIsGrief
b9ec577d11 Add basic configuration for the tests
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:11 +01:00
LoveIsGrief
c4cb16c379 Post-merge organization 2016-02-10 21:38:11 +01:00
abednarik
b20738a5a1 File state born deprecations.
Removed all Boron warning and deprecated code.
2016-02-08 10:01:28 -03:00