win_service - simply env test (#55498)

This commit is contained in:
Jordan Borean
2019-04-18 15:06:45 +10:00
committed by GitHub
parent ffce456de9
commit 62badd76a5
2 changed files with 4 additions and 13 deletions

View File

@@ -51,12 +51,6 @@
- TestServiceParent2
- TestServiceDependency
- name: remove test environment variable
win_environment:
name: TEST_SERVICE_PATH
level: machine
state: absent
- name: remove test directory
win_file:
path: '{{ test_win_service_dir }}'

View File

@@ -594,18 +594,13 @@
- win_service_path_again is not changed
- win_service_path_again.path == 'C:\\temp\\test.exe'
- name: create test environment variable
win_environment:
name: TEST_SERVICE_PATH
value: C:\temp
level: machine
state: present
- name: set service path with quotes and env var
win_service:
name: "{{test_win_service_name}}"
path: '"%TEST_SERVICE_PATH%\test.exe"'
register: win_service_env_quote_path
environment:
TEST_SERVICE_PATH: C:\temp
- name: check that the quoted service path has been changed
assert:
@@ -618,6 +613,8 @@
name: "{{test_win_service_name}}"
path: '"%TEST_SERVICE_PATH%\test.exe"'
register: win_service_env_quote_path_again
environment:
TEST_SERVICE_PATH: C:\temp
- name: check that the quoted service path has been changed again
assert: