From 369f6e8dd16411f9aa6d4d9445ba88edde772c25 Mon Sep 17 00:00:00 2001 From: Matt Richardson Date: Fri, 29 Oct 2021 14:32:24 +1100 Subject: [PATCH] Refactor out E2ETests to be separate from unit tests (#292) --- {Tests => E2ETests}/.rspec | 0 {Tests => E2ETests}/Gemfile | 0 {Tests => E2ETests}/Gemfile.lock | 0 {Tests => E2ETests}/Rakefile | 0 .../Scenarios/Configuration.psd1 | 0 .../Scenarios/Server_Scenario_01_Install.ps1 | 0 ...Server_Scenario_02_Install_Second_Node.ps1 | 0 .../Scenarios/Server_Scenario_03_Remove.ps1 | 0 .../Server_Scenario_04_Remove_Second_Node.ps1 | 0 ...er_Scenario_05_Install_Custom_Instance.ps1 | 0 ...ver_Scenario_06_Remove_Custom_Instance.ps1 | 0 .../Server_Scenario_07_Reinstall.ps1 | 0 .../Scenarios/Server_Scenario_08_Upgrade.ps1 | 0 .../Server_Scenario_09_Watchdog_Create.ps1 | 0 .../Server_Scenario_10_Watchdog_Delete.ps1 | 0 .../Scenarios/Server_Scenario_11_Remove.ps1 | 0 .../Server_Scenario_12_Built_In_Worker.ps1 | 0 .../Scenarios/Server_Scenario_13_Remove.ps1 | 0 ..._Scenario_14_Install_Without_Configure.ps1 | 0 ...rio_15_Configure_Preinstalled_Instance.ps1 | 0 .../Tentacle_Scenario_01_Install.ps1 | 0 .../Scenarios/Tentacle_Scenario_02_Remove.ps1 | 0 .../Tentacle_Scenario_03_Reinstall.ps1 | 0 .../Tentacle_Scenario_04_Upgrade.ps1 | 0 .../Tentacle_Scenario_05_Watchdog_Create.ps1 | 0 .../Tentacle_Scenario_06_Watchdog_Delete.ps1 | 0 .../Scenarios/Tentacle_Scenario_07_Remove.ps1 | 0 ...ntacle_Scenario_08_Tentacle_Comms_Port.ps1 | 0 .../Spec/server_scenario_01_install_spec.rb | 0 ...er_scenario_02_install_second_node_spec.rb | 0 .../Spec/server_scenario_03_remove_spec.rb | 0 ...ver_scenario_04_remove_second_node_spec.rb | 0 ...cenario_05_install_custom_instance_spec.rb | 0 ...scenario_06_remove_custom_instance_spec.rb | 0 .../Spec/server_scenario_07_reinstall_spec.rb | 0 .../Spec/server_scenario_08_upgrade_spec.rb | 0 ...server_scenario_09_watchdog_create_spec.rb | 0 ...server_scenario_10_watchdog_delete_spec.rb | 0 .../Spec/server_scenario_11_remove_spec.rb | 0 ...server_scenario_12_built_in_worker_spec.rb | 0 .../Spec/server_scenario_13_remove_spec.rb | 0 ...nario_14_install_without_configure_spec.rb | 0 ...15_configure_preinstalled_instance_spec.rb | 0 {Tests => E2ETests}/Spec/spec_helper.rb | 0 .../Spec/tentacle_scenario_01_install_spec.rb | 0 .../Spec/tentacle_scenario_02_remove_spec.rb | 0 .../tentacle_scenario_03_reinstall_spec.rb | 0 .../Spec/tentacle_scenario_04_upgrade_spec.rb | 0 ...ntacle_scenario_05_watchdog_create_spec.rb | 0 ...ntacle_scenario_06_watchdog_delete_spec.rb | 0 .../Spec/tentacle_scenario_07_remove_spec.rb | 0 ...le_scenario_08_tentacle_comms_port_spec.rb | 0 Tests/OctopusDSC.Tests.ps1 | 16 +++++++-------- vagrantfile | 20 +++++++++---------- 54 files changed, 18 insertions(+), 18 deletions(-) rename {Tests => E2ETests}/.rspec (100%) rename {Tests => E2ETests}/Gemfile (100%) rename {Tests => E2ETests}/Gemfile.lock (100%) rename {Tests => E2ETests}/Rakefile (100%) rename {Tests => E2ETests}/Scenarios/Configuration.psd1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_01_Install.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_02_Install_Second_Node.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_03_Remove.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_04_Remove_Second_Node.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_05_Install_Custom_Instance.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_06_Remove_Custom_Instance.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_07_Reinstall.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_08_Upgrade.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_09_Watchdog_Create.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_10_Watchdog_Delete.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_11_Remove.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_12_Built_In_Worker.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_13_Remove.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_14_Install_Without_Configure.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Server_Scenario_15_Configure_Preinstalled_Instance.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Tentacle_Scenario_01_Install.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Tentacle_Scenario_02_Remove.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Tentacle_Scenario_03_Reinstall.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Tentacle_Scenario_04_Upgrade.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Tentacle_Scenario_05_Watchdog_Create.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Tentacle_Scenario_06_Watchdog_Delete.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Tentacle_Scenario_07_Remove.ps1 (100%) rename {Tests => E2ETests}/Scenarios/Tentacle_Scenario_08_Tentacle_Comms_Port.ps1 (100%) rename {Tests => E2ETests}/Spec/server_scenario_01_install_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_02_install_second_node_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_03_remove_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_04_remove_second_node_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_05_install_custom_instance_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_06_remove_custom_instance_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_07_reinstall_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_08_upgrade_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_09_watchdog_create_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_10_watchdog_delete_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_11_remove_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_12_built_in_worker_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_13_remove_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_14_install_without_configure_spec.rb (100%) rename {Tests => E2ETests}/Spec/server_scenario_15_configure_preinstalled_instance_spec.rb (100%) rename {Tests => E2ETests}/Spec/spec_helper.rb (100%) rename {Tests => E2ETests}/Spec/tentacle_scenario_01_install_spec.rb (100%) rename {Tests => E2ETests}/Spec/tentacle_scenario_02_remove_spec.rb (100%) rename {Tests => E2ETests}/Spec/tentacle_scenario_03_reinstall_spec.rb (100%) rename {Tests => E2ETests}/Spec/tentacle_scenario_04_upgrade_spec.rb (100%) rename {Tests => E2ETests}/Spec/tentacle_scenario_05_watchdog_create_spec.rb (100%) rename {Tests => E2ETests}/Spec/tentacle_scenario_06_watchdog_delete_spec.rb (100%) rename {Tests => E2ETests}/Spec/tentacle_scenario_07_remove_spec.rb (100%) rename {Tests => E2ETests}/Spec/tentacle_scenario_08_tentacle_comms_port_spec.rb (100%) diff --git a/Tests/.rspec b/E2ETests/.rspec similarity index 100% rename from Tests/.rspec rename to E2ETests/.rspec diff --git a/Tests/Gemfile b/E2ETests/Gemfile similarity index 100% rename from Tests/Gemfile rename to E2ETests/Gemfile diff --git a/Tests/Gemfile.lock b/E2ETests/Gemfile.lock similarity index 100% rename from Tests/Gemfile.lock rename to E2ETests/Gemfile.lock diff --git a/Tests/Rakefile b/E2ETests/Rakefile similarity index 100% rename from Tests/Rakefile rename to E2ETests/Rakefile diff --git a/Tests/Scenarios/Configuration.psd1 b/E2ETests/Scenarios/Configuration.psd1 similarity index 100% rename from Tests/Scenarios/Configuration.psd1 rename to E2ETests/Scenarios/Configuration.psd1 diff --git a/Tests/Scenarios/Server_Scenario_01_Install.ps1 b/E2ETests/Scenarios/Server_Scenario_01_Install.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_01_Install.ps1 rename to E2ETests/Scenarios/Server_Scenario_01_Install.ps1 diff --git a/Tests/Scenarios/Server_Scenario_02_Install_Second_Node.ps1 b/E2ETests/Scenarios/Server_Scenario_02_Install_Second_Node.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_02_Install_Second_Node.ps1 rename to E2ETests/Scenarios/Server_Scenario_02_Install_Second_Node.ps1 diff --git a/Tests/Scenarios/Server_Scenario_03_Remove.ps1 b/E2ETests/Scenarios/Server_Scenario_03_Remove.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_03_Remove.ps1 rename to E2ETests/Scenarios/Server_Scenario_03_Remove.ps1 diff --git a/Tests/Scenarios/Server_Scenario_04_Remove_Second_Node.ps1 b/E2ETests/Scenarios/Server_Scenario_04_Remove_Second_Node.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_04_Remove_Second_Node.ps1 rename to E2ETests/Scenarios/Server_Scenario_04_Remove_Second_Node.ps1 diff --git a/Tests/Scenarios/Server_Scenario_05_Install_Custom_Instance.ps1 b/E2ETests/Scenarios/Server_Scenario_05_Install_Custom_Instance.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_05_Install_Custom_Instance.ps1 rename to E2ETests/Scenarios/Server_Scenario_05_Install_Custom_Instance.ps1 diff --git a/Tests/Scenarios/Server_Scenario_06_Remove_Custom_Instance.ps1 b/E2ETests/Scenarios/Server_Scenario_06_Remove_Custom_Instance.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_06_Remove_Custom_Instance.ps1 rename to E2ETests/Scenarios/Server_Scenario_06_Remove_Custom_Instance.ps1 diff --git a/Tests/Scenarios/Server_Scenario_07_Reinstall.ps1 b/E2ETests/Scenarios/Server_Scenario_07_Reinstall.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_07_Reinstall.ps1 rename to E2ETests/Scenarios/Server_Scenario_07_Reinstall.ps1 diff --git a/Tests/Scenarios/Server_Scenario_08_Upgrade.ps1 b/E2ETests/Scenarios/Server_Scenario_08_Upgrade.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_08_Upgrade.ps1 rename to E2ETests/Scenarios/Server_Scenario_08_Upgrade.ps1 diff --git a/Tests/Scenarios/Server_Scenario_09_Watchdog_Create.ps1 b/E2ETests/Scenarios/Server_Scenario_09_Watchdog_Create.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_09_Watchdog_Create.ps1 rename to E2ETests/Scenarios/Server_Scenario_09_Watchdog_Create.ps1 diff --git a/Tests/Scenarios/Server_Scenario_10_Watchdog_Delete.ps1 b/E2ETests/Scenarios/Server_Scenario_10_Watchdog_Delete.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_10_Watchdog_Delete.ps1 rename to E2ETests/Scenarios/Server_Scenario_10_Watchdog_Delete.ps1 diff --git a/Tests/Scenarios/Server_Scenario_11_Remove.ps1 b/E2ETests/Scenarios/Server_Scenario_11_Remove.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_11_Remove.ps1 rename to E2ETests/Scenarios/Server_Scenario_11_Remove.ps1 diff --git a/Tests/Scenarios/Server_Scenario_12_Built_In_Worker.ps1 b/E2ETests/Scenarios/Server_Scenario_12_Built_In_Worker.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_12_Built_In_Worker.ps1 rename to E2ETests/Scenarios/Server_Scenario_12_Built_In_Worker.ps1 diff --git a/Tests/Scenarios/Server_Scenario_13_Remove.ps1 b/E2ETests/Scenarios/Server_Scenario_13_Remove.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_13_Remove.ps1 rename to E2ETests/Scenarios/Server_Scenario_13_Remove.ps1 diff --git a/Tests/Scenarios/Server_Scenario_14_Install_Without_Configure.ps1 b/E2ETests/Scenarios/Server_Scenario_14_Install_Without_Configure.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_14_Install_Without_Configure.ps1 rename to E2ETests/Scenarios/Server_Scenario_14_Install_Without_Configure.ps1 diff --git a/Tests/Scenarios/Server_Scenario_15_Configure_Preinstalled_Instance.ps1 b/E2ETests/Scenarios/Server_Scenario_15_Configure_Preinstalled_Instance.ps1 similarity index 100% rename from Tests/Scenarios/Server_Scenario_15_Configure_Preinstalled_Instance.ps1 rename to E2ETests/Scenarios/Server_Scenario_15_Configure_Preinstalled_Instance.ps1 diff --git a/Tests/Scenarios/Tentacle_Scenario_01_Install.ps1 b/E2ETests/Scenarios/Tentacle_Scenario_01_Install.ps1 similarity index 100% rename from Tests/Scenarios/Tentacle_Scenario_01_Install.ps1 rename to E2ETests/Scenarios/Tentacle_Scenario_01_Install.ps1 diff --git a/Tests/Scenarios/Tentacle_Scenario_02_Remove.ps1 b/E2ETests/Scenarios/Tentacle_Scenario_02_Remove.ps1 similarity index 100% rename from Tests/Scenarios/Tentacle_Scenario_02_Remove.ps1 rename to E2ETests/Scenarios/Tentacle_Scenario_02_Remove.ps1 diff --git a/Tests/Scenarios/Tentacle_Scenario_03_Reinstall.ps1 b/E2ETests/Scenarios/Tentacle_Scenario_03_Reinstall.ps1 similarity index 100% rename from Tests/Scenarios/Tentacle_Scenario_03_Reinstall.ps1 rename to E2ETests/Scenarios/Tentacle_Scenario_03_Reinstall.ps1 diff --git a/Tests/Scenarios/Tentacle_Scenario_04_Upgrade.ps1 b/E2ETests/Scenarios/Tentacle_Scenario_04_Upgrade.ps1 similarity index 100% rename from Tests/Scenarios/Tentacle_Scenario_04_Upgrade.ps1 rename to E2ETests/Scenarios/Tentacle_Scenario_04_Upgrade.ps1 diff --git a/Tests/Scenarios/Tentacle_Scenario_05_Watchdog_Create.ps1 b/E2ETests/Scenarios/Tentacle_Scenario_05_Watchdog_Create.ps1 similarity index 100% rename from Tests/Scenarios/Tentacle_Scenario_05_Watchdog_Create.ps1 rename to E2ETests/Scenarios/Tentacle_Scenario_05_Watchdog_Create.ps1 diff --git a/Tests/Scenarios/Tentacle_Scenario_06_Watchdog_Delete.ps1 b/E2ETests/Scenarios/Tentacle_Scenario_06_Watchdog_Delete.ps1 similarity index 100% rename from Tests/Scenarios/Tentacle_Scenario_06_Watchdog_Delete.ps1 rename to E2ETests/Scenarios/Tentacle_Scenario_06_Watchdog_Delete.ps1 diff --git a/Tests/Scenarios/Tentacle_Scenario_07_Remove.ps1 b/E2ETests/Scenarios/Tentacle_Scenario_07_Remove.ps1 similarity index 100% rename from Tests/Scenarios/Tentacle_Scenario_07_Remove.ps1 rename to E2ETests/Scenarios/Tentacle_Scenario_07_Remove.ps1 diff --git a/Tests/Scenarios/Tentacle_Scenario_08_Tentacle_Comms_Port.ps1 b/E2ETests/Scenarios/Tentacle_Scenario_08_Tentacle_Comms_Port.ps1 similarity index 100% rename from Tests/Scenarios/Tentacle_Scenario_08_Tentacle_Comms_Port.ps1 rename to E2ETests/Scenarios/Tentacle_Scenario_08_Tentacle_Comms_Port.ps1 diff --git a/Tests/Spec/server_scenario_01_install_spec.rb b/E2ETests/Spec/server_scenario_01_install_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_01_install_spec.rb rename to E2ETests/Spec/server_scenario_01_install_spec.rb diff --git a/Tests/Spec/server_scenario_02_install_second_node_spec.rb b/E2ETests/Spec/server_scenario_02_install_second_node_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_02_install_second_node_spec.rb rename to E2ETests/Spec/server_scenario_02_install_second_node_spec.rb diff --git a/Tests/Spec/server_scenario_03_remove_spec.rb b/E2ETests/Spec/server_scenario_03_remove_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_03_remove_spec.rb rename to E2ETests/Spec/server_scenario_03_remove_spec.rb diff --git a/Tests/Spec/server_scenario_04_remove_second_node_spec.rb b/E2ETests/Spec/server_scenario_04_remove_second_node_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_04_remove_second_node_spec.rb rename to E2ETests/Spec/server_scenario_04_remove_second_node_spec.rb diff --git a/Tests/Spec/server_scenario_05_install_custom_instance_spec.rb b/E2ETests/Spec/server_scenario_05_install_custom_instance_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_05_install_custom_instance_spec.rb rename to E2ETests/Spec/server_scenario_05_install_custom_instance_spec.rb diff --git a/Tests/Spec/server_scenario_06_remove_custom_instance_spec.rb b/E2ETests/Spec/server_scenario_06_remove_custom_instance_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_06_remove_custom_instance_spec.rb rename to E2ETests/Spec/server_scenario_06_remove_custom_instance_spec.rb diff --git a/Tests/Spec/server_scenario_07_reinstall_spec.rb b/E2ETests/Spec/server_scenario_07_reinstall_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_07_reinstall_spec.rb rename to E2ETests/Spec/server_scenario_07_reinstall_spec.rb diff --git a/Tests/Spec/server_scenario_08_upgrade_spec.rb b/E2ETests/Spec/server_scenario_08_upgrade_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_08_upgrade_spec.rb rename to E2ETests/Spec/server_scenario_08_upgrade_spec.rb diff --git a/Tests/Spec/server_scenario_09_watchdog_create_spec.rb b/E2ETests/Spec/server_scenario_09_watchdog_create_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_09_watchdog_create_spec.rb rename to E2ETests/Spec/server_scenario_09_watchdog_create_spec.rb diff --git a/Tests/Spec/server_scenario_10_watchdog_delete_spec.rb b/E2ETests/Spec/server_scenario_10_watchdog_delete_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_10_watchdog_delete_spec.rb rename to E2ETests/Spec/server_scenario_10_watchdog_delete_spec.rb diff --git a/Tests/Spec/server_scenario_11_remove_spec.rb b/E2ETests/Spec/server_scenario_11_remove_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_11_remove_spec.rb rename to E2ETests/Spec/server_scenario_11_remove_spec.rb diff --git a/Tests/Spec/server_scenario_12_built_in_worker_spec.rb b/E2ETests/Spec/server_scenario_12_built_in_worker_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_12_built_in_worker_spec.rb rename to E2ETests/Spec/server_scenario_12_built_in_worker_spec.rb diff --git a/Tests/Spec/server_scenario_13_remove_spec.rb b/E2ETests/Spec/server_scenario_13_remove_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_13_remove_spec.rb rename to E2ETests/Spec/server_scenario_13_remove_spec.rb diff --git a/Tests/Spec/server_scenario_14_install_without_configure_spec.rb b/E2ETests/Spec/server_scenario_14_install_without_configure_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_14_install_without_configure_spec.rb rename to E2ETests/Spec/server_scenario_14_install_without_configure_spec.rb diff --git a/Tests/Spec/server_scenario_15_configure_preinstalled_instance_spec.rb b/E2ETests/Spec/server_scenario_15_configure_preinstalled_instance_spec.rb similarity index 100% rename from Tests/Spec/server_scenario_15_configure_preinstalled_instance_spec.rb rename to E2ETests/Spec/server_scenario_15_configure_preinstalled_instance_spec.rb diff --git a/Tests/Spec/spec_helper.rb b/E2ETests/Spec/spec_helper.rb similarity index 100% rename from Tests/Spec/spec_helper.rb rename to E2ETests/Spec/spec_helper.rb diff --git a/Tests/Spec/tentacle_scenario_01_install_spec.rb b/E2ETests/Spec/tentacle_scenario_01_install_spec.rb similarity index 100% rename from Tests/Spec/tentacle_scenario_01_install_spec.rb rename to E2ETests/Spec/tentacle_scenario_01_install_spec.rb diff --git a/Tests/Spec/tentacle_scenario_02_remove_spec.rb b/E2ETests/Spec/tentacle_scenario_02_remove_spec.rb similarity index 100% rename from Tests/Spec/tentacle_scenario_02_remove_spec.rb rename to E2ETests/Spec/tentacle_scenario_02_remove_spec.rb diff --git a/Tests/Spec/tentacle_scenario_03_reinstall_spec.rb b/E2ETests/Spec/tentacle_scenario_03_reinstall_spec.rb similarity index 100% rename from Tests/Spec/tentacle_scenario_03_reinstall_spec.rb rename to E2ETests/Spec/tentacle_scenario_03_reinstall_spec.rb diff --git a/Tests/Spec/tentacle_scenario_04_upgrade_spec.rb b/E2ETests/Spec/tentacle_scenario_04_upgrade_spec.rb similarity index 100% rename from Tests/Spec/tentacle_scenario_04_upgrade_spec.rb rename to E2ETests/Spec/tentacle_scenario_04_upgrade_spec.rb diff --git a/Tests/Spec/tentacle_scenario_05_watchdog_create_spec.rb b/E2ETests/Spec/tentacle_scenario_05_watchdog_create_spec.rb similarity index 100% rename from Tests/Spec/tentacle_scenario_05_watchdog_create_spec.rb rename to E2ETests/Spec/tentacle_scenario_05_watchdog_create_spec.rb diff --git a/Tests/Spec/tentacle_scenario_06_watchdog_delete_spec.rb b/E2ETests/Spec/tentacle_scenario_06_watchdog_delete_spec.rb similarity index 100% rename from Tests/Spec/tentacle_scenario_06_watchdog_delete_spec.rb rename to E2ETests/Spec/tentacle_scenario_06_watchdog_delete_spec.rb diff --git a/Tests/Spec/tentacle_scenario_07_remove_spec.rb b/E2ETests/Spec/tentacle_scenario_07_remove_spec.rb similarity index 100% rename from Tests/Spec/tentacle_scenario_07_remove_spec.rb rename to E2ETests/Spec/tentacle_scenario_07_remove_spec.rb diff --git a/Tests/Spec/tentacle_scenario_08_tentacle_comms_port_spec.rb b/E2ETests/Spec/tentacle_scenario_08_tentacle_comms_port_spec.rb similarity index 100% rename from Tests/Spec/tentacle_scenario_08_tentacle_comms_port_spec.rb rename to E2ETests/Spec/tentacle_scenario_08_tentacle_comms_port_spec.rb diff --git a/Tests/OctopusDSC.Tests.ps1 b/Tests/OctopusDSC.Tests.ps1 index 767b49a84..746216a11 100644 --- a/Tests/OctopusDSC.Tests.ps1 +++ b/Tests/OctopusDSC.Tests.ps1 @@ -49,7 +49,7 @@ Describe "OctopusDSC" { #even though it works fine on ubuntu locally Set-ItResult -Inconclusive -Because "We couldnt get this test to run on our CentOS buildagent" } else { - $path = Resolve-Path "$PSCommandPath/../../Tests/Scenarios" + $path = Resolve-Path "$PSCommandPath/../../E2ETests/Scenarios" Write-Output "Running PsScriptAnalyzer against $path" $results = @(Invoke-ScriptAnalyzer $path -recurse -exclude @('PSUseShouldProcessForStateChangingFunctions', 'PSAvoidUsingConvertToSecureStringWithPlainText')) $results | ConvertTo-Json | Out-File PsScriptAnalyzer-Scenarios.log @@ -288,11 +288,12 @@ Describe "OctopusDSC" { Describe "Configuration Scenarios" { BeforeDiscovery { - $path = Resolve-Path "$PSCommandPath/../../Tests/Scenarios" + $path = Resolve-Path "$PSCommandPath/../../E2ETests/Scenarios" $name = @{label="name";expression={[System.Io.Path]::GetFileNameWithoutExtension($_.Name)}}; $fullName = @{label="fullName";expression={$_.FullName}}; + $specPath = @{label="specPath";expression={"$path/../Spec/$([System.Io.Path]::GetFileNameWithoutExtension($_.Name).ToLower() + '_spec.rb')"}}; - $cases = @(Get-ChildItem $path -Recurse -Filter *.ps1 | Select-Object -Property $name, $fullName) | ConvertTo-Hashtable + $cases = @(Get-ChildItem $path -Recurse -Filter *.ps1 | Select-Object -Property $name, $fullName, $specPath) | ConvertTo-Hashtable } It "Configuration block in scenario should have the same name as the file" -ForEach $cases { @@ -300,10 +301,9 @@ Describe "OctopusDSC" { $fullName | Should -FileContentMatch "Configuration $name" } - It "Scenario should have a matching spec" -ForEach $cases { - param([string]$name, [string]$fullName) - $specName = ($name + '_spec.rb').ToLower() - (Resolve-Path "$PSCommandPath/../../Tests/Spec/$specName") | Should -Exist + It "Scenario should have a matching spec at " -ForEach $cases { + param([string]$name, [string]$fullName, [string]$specPath) + (Resolve-Path $specPath) | Should -Exist } } -} \ No newline at end of file +} diff --git a/vagrantfile b/vagrantfile index 2290ce382..31bcaea25 100644 --- a/vagrantfile +++ b/vagrantfile @@ -49,8 +49,8 @@ def run_octopus_scenario(config, scenario, log_files) config.vm.provision "shell", inline: "write-output \"##teamcity[blockOpened name='Running Scenario #{scenario}']\"" config.vm.provision "dsc" do |dsc| dsc.configuration_file = "#{scenario}.ps1" - dsc.configuration_data_file = "Tests/Scenarios/Configuration.psd1" - dsc.manifests_path = "Tests/Scenarios/" + dsc.configuration_data_file = "E2ETests/Scenarios/Configuration.psd1" + dsc.manifests_path = "E2ETests/Scenarios/" dsc.abort_on_dsc_failure = true end config.vm.provision "shell", inline: "write-output \"##teamcity[blockClosed name='Running Scenario #{scenario}']\"" @@ -63,8 +63,8 @@ def run_tentacle_scenario(config, scenario, log_files) config.vm.provision "shell", inline: "write-output \"##teamcity[blockOpened name='Running Scenario #{scenario}']\"" config.vm.provision "dsc" do |dsc| dsc.configuration_file = "#{scenario}.ps1" - dsc.configuration_data_file = "Tests/Scenarios/Configuration.psd1" - dsc.manifests_path = "Tests/Scenarios/" + dsc.configuration_data_file = "E2ETests/Scenarios/Configuration.psd1" + dsc.manifests_path = "E2ETests/Scenarios/" dsc.abort_on_dsc_failure = true end config.vm.provision "shell", inline: "write-output \"##teamcity[blockClosed name='Running Scenario #{scenario}']\"" @@ -165,7 +165,7 @@ Vagrant.configure(VAGRANT_FILE_API_VERSION) do |config| # delete existing tests if they exist (for dev) config.vm.provision "shell", inline: "if (Test-Path 'c:\\temp\\tests') {remove-item -force -recurse 'c:\\temp\\tests' }" # upload tests - config.vm.provision "file", source: "Tests", destination: "c:\\temp\\tests" + config.vm.provision "file", source: "E2ETests", destination: "c:\\temp\\tests" config.vm.provision "shell", path: "Tests/install-test-dependencies.ps1" # in theory, we shouldn't have to do this - the vagrant-dsc should upload it automatically, but cant get it to work config.vm.provision "file", source: "OctopusDSC", destination: 'C:\Windows\System32\WindowsPowerShell\v1.0\modules\OctopusDSC' @@ -269,8 +269,8 @@ Vagrant.configure(VAGRANT_FILE_API_VERSION) do |config| 'C:/Octopus/Logs/OctopusServer.txt', 'C:/Octopus/OctopusServer-ConfigurePreInstalledInstance.config', 'C:/Octopus/OctopusServer-OctopusServer.config']) - config.vm.provision "shell", inline: "& c:\\temp\\Tests\\register-polling-tentacle.ps1; exit $LASTEXITCODE" - config.vm.provision "shell", inline: "& c:\\temp\\Tests\\trigger-and-wait-for-healthcheck.ps1; exit $LASTEXITCODE" + config.vm.provision "shell", path: "Tests/register-polling-tentacle.ps1" + config.vm.provision "shell", path: "Tests/trigger-and-wait-for-healthcheck.ps1" config.vm.provision "shell", inline: $run_test_scenario_script.gsub('{scenario_name}', 'tentacle_scenario_01_install') # uninstall tentacle @@ -282,7 +282,7 @@ Vagrant.configure(VAGRANT_FILE_API_VERSION) do |config| 'C:/Octopus/Logs/trigger-and-wait-for-healthcheck.txt', 'C:/Octopus/OctopusServer-ConfigurePreInstalledInstance.config', 'C:/Octopus/OctopusServer-OctopusServer.config']) - config.vm.provision "shell", inline: "& c:\\temp\\Tests\\trigger-and-wait-for-healthcheck.ps1; exit $LASTEXITCODE" + config.vm.provision "shell", path: "Tests/trigger-and-wait-for-healthcheck.ps1" config.vm.provision "shell", inline: $run_test_scenario_script.gsub('{scenario_name}', 'tentacle_scenario_02_remove') # Install old version @@ -296,7 +296,7 @@ Vagrant.configure(VAGRANT_FILE_API_VERSION) do |config| 'C:/Octopus/OctopusServer-OctopusServer.config', 'C:/Octopus/OctopusTentacleHome/Logs/OctopusTentacle.txt', 'C:/Octopus/OctopusTentacleHome/Tentacle/Tentacle.config']) - config.vm.provision "shell", inline: "& c:\\temp\\Tests\\trigger-and-wait-for-healthcheck.ps1; exit $LASTEXITCODE" + config.vm.provision "shell", path: "Tests/trigger-and-wait-for-healthcheck.ps1" config.vm.provision "shell", inline: $run_test_scenario_script.gsub('{scenario_name}', 'tentacle_scenario_03_reinstall') # Upgrade it @@ -310,7 +310,7 @@ Vagrant.configure(VAGRANT_FILE_API_VERSION) do |config| 'C:/Octopus/OctopusServer-OctopusServer.config', 'C:/Octopus/OctopusTentacleHome/Logs/OctopusTentacle.txt', 'C:/Octopus/OctopusTentacleHome/Tentacle/Tentacle.config']) - config.vm.provision "shell", inline: "& c:\\temp\\Tests\\trigger-and-wait-for-healthcheck.ps1; exit $LASTEXITCODE" + config.vm.provision "shell", path: "Tests/trigger-and-wait-for-healthcheck.ps1" config.vm.provision "shell", inline: $run_test_scenario_script.gsub('{scenario_name}', 'tentacle_scenario_04_upgrade') # install watchdog