test helper unit tests: reformat YAML files (#9664)

This commit is contained in:
Alexei Znamensky 2025-02-01 23:16:03 +13:00 committed by GitHub
parent 4d384bd74a
commit 439da9e6da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 1611 additions and 1611 deletions

View file

@ -8,13 +8,13 @@ anchors:
environ_true: &env-def-true {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true}
environ_false: &env-def-false {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: false}
test_cases:
- id: install_dancer_compatibility
- id: install_dancer_compatibility
input:
name: Dancer
mode: compatibility
output:
changed: true
cpanm_version: "1.7047"
cpanm_version: '1.7047'
mocks:
run_command:
- command: [/testbin/cpanm, --version]
@ -23,18 +23,18 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
- command: [/testbin/perl, -le, 'use Dancer;']
err: ''
- command: [/testbin/perl, -le, use Dancer;]
environ: *env-def-false
rc: 2
out: ""
err: "error, not installed"
out: ''
err: error, not installed
- command: [/testbin/cpanm, Dancer]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_dancer_already_installed_compatibility
out: ''
err: ''
- id: install_dancer_already_installed_compatibility
input:
name: Dancer
mode: compatibility
@ -48,13 +48,13 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
- command: [/testbin/perl, -le, 'use Dancer;']
err: ''
- command: [/testbin/perl, -le, use Dancer;]
environ: *env-def-false
rc: 0
out: ""
err: ""
- id: install_dancer
out: ''
err: ''
- id: install_dancer
input:
name: Dancer
output:
@ -67,13 +67,13 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
err: ''
- command: [/testbin/cpanm, Dancer]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_distribution_file_compatibility
out: ''
err: ''
- id: install_distribution_file_compatibility
input:
name: MIYAGAWA/Plack-0.99_05.tar.gz
mode: compatibility
@ -87,13 +87,13 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
err: ''
- command: [/testbin/cpanm, MIYAGAWA/Plack-0.99_05.tar.gz]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_distribution_file
out: ''
err: ''
- id: install_distribution_file
input:
name: MIYAGAWA/Plack-0.99_05.tar.gz
output:
@ -106,13 +106,13 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
err: ''
- command: [/testbin/cpanm, MIYAGAWA/Plack-0.99_05.tar.gz]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_into_locallib
out: ''
err: ''
- id: install_into_locallib
input:
name: Dancer
mode: new
@ -127,13 +127,13 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
err: ''
- command: [/testbin/cpanm, --local-lib, /srv/webapps/my_app/extlib, Dancer]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_from_local_directory
out: ''
err: ''
- id: install_from_local_directory
input:
from_path: /srv/webapps/my_app/src/
mode: new
@ -147,13 +147,13 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
err: ''
- command: [/testbin/cpanm, /srv/webapps/my_app/src/]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_into_locallib_no_unit_testing
out: ''
err: ''
- id: install_into_locallib_no_unit_testing
input:
name: Dancer
notest: true
@ -169,17 +169,17 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
err: ''
- command: [/testbin/cpanm, --notest, --local-lib, /srv/webapps/my_app/extlib, Dancer]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_from_mirror
out: ''
err: ''
- id: install_from_mirror
input:
name: Dancer
mode: new
mirror: "http://cpan.cpantesters.org/"
mirror: http://cpan.cpantesters.org/
output:
changed: true
mocks:
@ -190,13 +190,13 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
- command: [/testbin/cpanm, --mirror, "http://cpan.cpantesters.org/", Dancer]
err: ''
- command: [/testbin/cpanm, --mirror, http://cpan.cpantesters.org/, Dancer]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_into_system_lib
out: ''
err: ''
- id: install_into_system_lib
input:
name: Dancer
mode: new
@ -205,11 +205,11 @@ test_cases:
failed: true
mocks:
run_command: []
- id: install_minversion_implicit
- id: install_minversion_implicit
input:
name: Dancer
mode: new
version: "1.0"
version: '1.0'
output:
changed: true
mocks:
@ -220,17 +220,17 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
err: ''
- command: [/testbin/cpanm, Dancer~1.0]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_minversion_explicit
out: ''
err: ''
- id: install_minversion_explicit
input:
name: Dancer
mode: new
version: "~1.5"
version: ~1.5
output:
changed: true
mocks:
@ -241,17 +241,17 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
err: ''
- command: [/testbin/cpanm, Dancer~1.5]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_specific_version
out: ''
err: ''
- id: install_specific_version
input:
name: Dancer
mode: new
version: "@1.7"
version: '@1.7'
output:
changed: true
mocks:
@ -262,17 +262,17 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
err: ''
- command: [/testbin/cpanm, Dancer@1.7]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_specific_version_from_file_error
out: ''
err: ''
- id: install_specific_version_from_file_error
input:
name: MIYAGAWA/Plack-0.99_05.tar.gz
mode: new
version: "@1.7"
version: '@1.7'
output:
failed: true
msg: parameter 'version' must not be used when installing from a file
@ -284,12 +284,12 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
- id: install_specific_version_from_directory_error
err: ''
- id: install_specific_version_from_directory_error
input:
from_path: ~/
mode: new
version: "@1.7"
version: '@1.7'
output:
failed: true
msg: parameter 'version' must not be used when installing from a directory
@ -301,12 +301,12 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
- id: install_specific_version_from_git_url_explicit
err: ''
- id: install_specific_version_from_git_url_explicit
input:
name: "git://github.com/plack/Plack.git"
name: git://github.com/plack/Plack.git
mode: new
version: "@1.7"
version: '@1.7'
output:
changed: true
mocks:
@ -317,17 +317,17 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
- command: [/testbin/cpanm, "git://github.com/plack/Plack.git@1.7"]
err: ''
- command: [/testbin/cpanm, git://github.com/plack/Plack.git@1.7]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_specific_version_from_git_url_implicit
out: ''
err: ''
- id: install_specific_version_from_git_url_implicit
input:
name: "git://github.com/plack/Plack.git"
name: git://github.com/plack/Plack.git
mode: new
version: "2.5"
version: '2.5'
output:
changed: true
mocks:
@ -338,17 +338,17 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
- command: [/testbin/cpanm, "git://github.com/plack/Plack.git@2.5"]
err: ''
- command: [/testbin/cpanm, git://github.com/plack/Plack.git@2.5]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_version_operator_from_git_url_error
out: ''
err: ''
- id: install_version_operator_from_git_url_error
input:
name: "git://github.com/plack/Plack.git"
name: git://github.com/plack/Plack.git
mode: new
version: "~2.5"
version: ~2.5
output:
failed: true
msg: operator '~' not allowed in version parameter when installing from git repository
@ -360,8 +360,8 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
- id: install_dancer_with_recommends
err: ''
- id: install_dancer_with_recommends
input:
name: Dancer2
install_recommendations: true
@ -375,13 +375,13 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
err: ''
- command: [/testbin/cpanm, --with-recommends, Dancer2]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_dancer_with_suggests
out: ''
err: ''
- id: install_dancer_with_suggests
input:
name: Dancer2
install_suggestions: true
@ -395,9 +395,9 @@ test_cases:
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
err: ''
- command: [/testbin/cpanm, --with-suggests, Dancer2]
environ: *env-def-true
rc: 0
out: ""
err: ""
out: ''
err: ''

View file

@ -7,40 +7,40 @@
anchors:
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true}
test_cases:
- id: success
- id: success
input:
settings: whatever.settings
output:
version: "5.1.2"
version: 5.1.2
mocks:
run_command:
- command: [/testbin/python, -m, django, --version]
environ: *env-def
rc: 0
out: "5.1.2\n"
err: ""
err: ''
- command: [/testbin/python, -m, django, check, --no-color, --settings=whatever.settings]
environ: *env-def
rc: 0
out: "whatever\n"
err: ""
- id: multiple_databases
err: ''
- id: multiple_databases
input:
settings: whatever.settings
database:
- abc
- def
output:
version: "5.1.2"
version: 5.1.2
mocks:
run_command:
- command: [/testbin/python, -m, django, --version]
environ: *env-def
rc: 0
out: "5.1.2\n"
err: ""
err: ''
- command: [/testbin/python, -m, django, check, --no-color, --settings=whatever.settings, --database, abc, --database, def]
environ: *env-def
rc: 0
out: "whatever\n"
err: ""
err: ''

View file

@ -7,7 +7,7 @@
anchors:
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true}
test_cases:
- id: command_success
- id: command_success
input:
command: check
extra_args:
@ -22,13 +22,13 @@ test_cases:
environ: *env-def
rc: 0
out: "5.1.2\n"
err: ""
err: ''
- command: [/testbin/python, -m, django, check, --no-color, --settings=whatever.settings, babaloo, yaba, daba, doo]
environ: *env-def
rc: 0
out: "whatever\n"
err: ""
- id: command_fail
err: ''
- id: command_fail
input:
command: check
extra_args:
@ -45,9 +45,9 @@ test_cases:
environ: *env-def
rc: 0
out: "5.1.2\n"
err: ""
err: ''
- command: [/testbin/python, -m, django, check, --no-color, --settings=whatever.settings, babaloo, yaba, daba, doo]
environ: *env-def
rc: 1
out: "whatever\n"
err: ""
err: ''

View file

@ -7,7 +7,7 @@
anchors:
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true}
test_cases:
- id: command_success
- id: command_success
input:
settings: whatever.settings
mocks:
@ -16,9 +16,9 @@ test_cases:
environ: *env-def
rc: 0
out: "5.1.2\n"
err: ""
err: ''
- command: [/testbin/python, -m, django, createcachetable, --no-color, --settings=whatever.settings, --noinput, --database=default]
environ: *env-def
rc: 0
out: "whatever\n"
err: ""
err: ''

View file

@ -7,7 +7,7 @@
anchors:
environ: &env-def {check_rc: true}
test_cases:
- id: simple run
- id: simple run
output:
ansible_facts:
facter:
@ -21,8 +21,8 @@ test_cases:
rc: 0
out: >
{ "a": 1, "b": 2, "c": 3 }
err: ""
- id: with args
err: ''
- id: with args
input:
arguments:
- -p
@ -42,4 +42,4 @@ test_cases:
rc: 0
out: >
{ "a": 1, "b": 2, "c": 3 }
err: ""
err: ''

View file

@ -7,7 +7,7 @@
anchors:
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true}
test_cases:
- id: test_simple_element_set
- id: test_simple_element_set
input:
state: present
key: /desktop/gnome/background/picture_filename
@ -16,30 +16,30 @@ test_cases:
output:
new_value: '200'
changed: true
version: "3.2.6"
version: 3.2.6
mocks:
run_command:
- command: [/testbin/gconftool-2, --version]
environ: *env-def
rc: 0
out: "3.2.6\n"
err: ""
err: ''
- command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
environ: *env-def
rc: 0
out: "100\n"
err: ""
- command: [/testbin/gconftool-2, --type, int, --set, /desktop/gnome/background/picture_filename, "200"]
err: ''
- command: [/testbin/gconftool-2, --type, int, --set, /desktop/gnome/background/picture_filename, '200']
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
environ: *env-def
rc: 0
out: "200\n"
err: ""
- id: test_simple_element_set_idempotency_int
err: ''
- id: test_simple_element_set_idempotency_int
input:
state: present
key: /desktop/gnome/background/picture_filename
@ -48,30 +48,30 @@ test_cases:
output:
new_value: '200'
changed: false
version: "3.2.5"
version: 3.2.5
mocks:
run_command:
- command: [/testbin/gconftool-2, --version]
environ: *env-def
rc: 0
out: "3.2.5\n"
err: ""
err: ''
- command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
environ: *env-def
rc: 0
out: "200\n"
err: ""
- command: [/testbin/gconftool-2, --type, int, --set, /desktop/gnome/background/picture_filename, "200"]
err: ''
- command: [/testbin/gconftool-2, --type, int, --set, /desktop/gnome/background/picture_filename, '200']
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
environ: *env-def
rc: 0
out: "200\n"
err: ""
- id: test_simple_element_set_idempotency_bool
err: ''
- id: test_simple_element_set_idempotency_bool
input:
state: present
key: /apps/gnome_settings_daemon/screensaver/start_screensaver
@ -80,30 +80,30 @@ test_cases:
output:
new_value: 'false'
changed: false
version: "3.2.4"
version: 3.2.4
mocks:
run_command:
- command: [/testbin/gconftool-2, --version]
environ: *env-def
rc: 0
out: "3.2.4\n"
err: ""
err: ''
- command: [/testbin/gconftool-2, --get, /apps/gnome_settings_daemon/screensaver/start_screensaver]
environ: *env-def
rc: 0
out: "false\n"
err: ""
- command: [/testbin/gconftool-2, --type, bool, --set, /apps/gnome_settings_daemon/screensaver/start_screensaver, "False"]
err: ''
- command: [/testbin/gconftool-2, --type, bool, --set, /apps/gnome_settings_daemon/screensaver/start_screensaver, 'False']
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/gconftool-2, --get, /apps/gnome_settings_daemon/screensaver/start_screensaver]
environ: *env-def
rc: 0
out: "false\n"
err: ""
- id: test_simple_element_unset
err: ''
- id: test_simple_element_unset
input:
state: absent
key: /desktop/gnome/background/picture_filename
@ -116,18 +116,18 @@ test_cases:
environ: *env-def
rc: 0
out: "3.2.4\n"
err: ""
err: ''
- command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
environ: *env-def
rc: 0
out: "200\n"
err: ""
err: ''
- command: [/testbin/gconftool-2, --unset, /desktop/gnome/background/picture_filename]
environ: *env-def
rc: 0
out: ""
err: ""
- id: test_simple_element_unset_idempotency
out: ''
err: ''
- id: test_simple_element_unset_idempotency
input:
state: absent
key: /apps/gnome_settings_daemon/screensaver/start_screensaver
@ -140,14 +140,14 @@ test_cases:
environ: *env-def
rc: 0
out: "3.2.4\n"
err: ""
err: ''
- command: [/testbin/gconftool-2, --get, /apps/gnome_settings_daemon/screensaver/start_screensaver]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/gconftool-2, --unset, /apps/gnome_settings_daemon/screensaver/start_screensaver]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''

View file

@ -7,7 +7,7 @@
anchors:
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true}
test_cases:
- id: test_simple_element_get
- id: test_simple_element_get
input:
key: /desktop/gnome/background/picture_filename
output:
@ -18,13 +18,13 @@ test_cases:
environ: *env-def
rc: 0
out: "3.2.6\n"
err: ""
err: ''
- command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
environ: *env-def
rc: 0
out: "100\n"
err: ""
- id: test_simple_element_get_not_found
err: ''
- id: test_simple_element_get_not_found
input:
key: /desktop/gnome/background/picture_filename
output:
@ -35,9 +35,9 @@ test_cases:
environ: *env-def
rc: 0
out: "3.2.6\n"
err: ""
err: ''
- command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
environ: *env-def
rc: 0
out: ""
out: ''
err: "No value set for `/desktop/gnome/background/picture_filename'\n"

View file

@ -7,7 +7,7 @@
anchors:
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true}
test_cases:
- id: test_set_handler
- id: test_set_handler
input:
handler: google-chrome.desktop
mime_type: x-scheme-handler/http
@ -20,19 +20,19 @@ test_cases:
environ: *env-def
rc: 0
out: "2.80.0\n"
err: ""
err: ''
- command: [/testbin/gio, mime, x-scheme-handler/http]
environ: *env-def
rc: 0
out: ""
out: ''
err: >
No default applications for “x-scheme-handler/http”
- command: [/testbin/gio, mime, x-scheme-handler/http, google-chrome.desktop]
environ: *env-def
rc: 0
out: "Set google-chrome.desktop as the default for x-scheme-handler/http\n"
err: ""
- id: test_set_handler_check
err: ''
- id: test_set_handler_check
input:
handler: google-chrome.desktop
mime_type: x-scheme-handler/http
@ -47,19 +47,19 @@ test_cases:
environ: *env-def
rc: 0
out: "2.80.0\n"
err: ""
err: ''
- command: [/testbin/gio, mime, x-scheme-handler/http]
environ: *env-def
rc: 0
out: ""
out: ''
err: >
No default applications for “x-scheme-handler/http”
- command: [/testbin/gio, mime, x-scheme-handler/http, google-chrome.desktop]
environ: *env-def
rc: 0
out: "Set google-chrome.desktop as the default for x-scheme-handler/http\n"
err: ""
- id: test_set_handler_idempot
err: ''
- id: test_set_handler_idempot
input:
handler: google-chrome.desktop
mime_type: x-scheme-handler/http
@ -72,7 +72,7 @@ test_cases:
environ: *env-def
rc: 0
out: "2.80.0\n"
err: ""
err: ''
- command: [/testbin/gio, mime, x-scheme-handler/http]
environ: *env-def
rc: 0
@ -88,4 +88,4 @@ test_cases:
firefox.desktop
google-chrome.desktop
firefox_firefox.desktop
err: ""
err: ''

View file

@ -9,7 +9,7 @@ anchors:
environ_data: &env-data {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true, data: cool_password}
environ_norc: &env-norc {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true}
test_cases:
- id: test_kinit_default
- id: test_kinit_default
input:
state: present
password: cool_password
@ -20,14 +20,14 @@ test_cases:
- command: [/testbin/klist]
environ: *env-def
rc: 1
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/kinit]
environ: *env-data
rc: 0
out: ""
err: ""
- id: test_kinit_principal
out: ''
err: ''
- id: test_kinit_principal
input:
state: present
password: cool_password
@ -39,14 +39,14 @@ test_cases:
- command: [/testbin/klist, -l]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/kinit, admin@IPA.TEST]
environ: *env-data
rc: 0
out: ""
err: ""
- id: test_kdestroy_default
out: ''
err: ''
- id: test_kdestroy_default
input:
state: absent
output:
@ -56,14 +56,14 @@ test_cases:
- command: [/testbin/klist]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/kdestroy]
environ: *env-norc
rc: 0
out: ""
err: ""
- id: test_kdestroy_principal
out: ''
err: ''
- id: test_kdestroy_principal
input:
state: absent
principal: admin@IPA.TEST
@ -74,14 +74,14 @@ test_cases:
- command: [/testbin/klist, -l]
environ: *env-def
rc: 0
out: "admin@IPA.TEST"
err: ""
out: admin@IPA.TEST
err: ''
- command: [/testbin/kdestroy, -p, admin@IPA.TEST]
environ: *env-norc
rc: 0
out: ""
err: ""
- id: test_kdestroy_cache_name
out: ''
err: ''
- id: test_kdestroy_cache_name
input:
state: absent
cache_name: KEYRING:persistent:0:0
@ -92,14 +92,14 @@ test_cases:
- command: [/testbin/klist, -l]
environ: *env-def
rc: 0
out: "KEYRING:persistent:0:0"
err: ""
out: KEYRING:persistent:0:0
err: ''
- command: [/testbin/kdestroy, -c, KEYRING:persistent:0:0]
environ: *env-norc
rc: 0
out: ""
err: ""
- id: test_kdestroy_all
out: ''
err: ''
- id: test_kdestroy_all
input:
state: absent
kdestroy_all: true
@ -110,5 +110,5 @@ test_cases:
- command: [/testbin/kdestroy, -A]
environ: *env-norc
rc: 0
out: ""
err: ""
out: ''
err: ''

View file

@ -7,7 +7,7 @@
anchors:
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: false}
test_cases:
- id: install_zlibdev
- id: install_zlibdev
input:
name: zlib-dev
state: present
@ -18,13 +18,13 @@ test_cases:
- command: [/testbin/opkg, --version]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/opkg, list-installed, zlib-dev]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/opkg, install, zlib-dev]
environ: *env-def
rc: 0
@ -35,14 +35,14 @@ test_cases:
Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib_1.2.11-6_mips_24kc.ipk
Configuring zlib.
Configuring zlib-dev.
err: ""
err: ''
- command: [/testbin/opkg, list-installed, zlib-dev]
environ: *env-def
rc: 0
out: |
zlib-dev - 1.2.11-6
err: ""
- id: install_zlibdev_present
err: ''
- id: install_zlibdev_present
input:
name: zlib-dev
state: present
@ -53,15 +53,15 @@ test_cases:
- command: [/testbin/opkg, --version]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/opkg, list-installed, zlib-dev]
environ: *env-def
rc: 0
out: |
zlib-dev - 1.2.11-6
err: ""
- id: install_zlibdev_force_reinstall
err: ''
- id: install_zlibdev_force_reinstall
input:
name: zlib-dev
state: present
@ -73,14 +73,14 @@ test_cases:
- command: [/testbin/opkg, --version]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/opkg, list-installed, zlib-dev]
environ: *env-def
rc: 0
out: |
zlib-dev - 1.2.11-6
err: ""
err: ''
- command: [/testbin/opkg, install, --force-reinstall, zlib-dev]
environ: *env-def
rc: 0
@ -88,14 +88,14 @@ test_cases:
Installing zlib-dev (1.2.11-6) to root...
Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib-dev_1.2.11-6_mips_24kc.ipk
Configuring zlib-dev.
err: ""
err: ''
- command: [/testbin/opkg, list-installed, zlib-dev]
environ: *env-def
rc: 0
out: |
zlib-dev - 1.2.11-6
err: ""
- id: install_zlibdev_with_version
err: ''
- id: install_zlibdev_with_version
input:
name: zlib-dev=1.2.11-6
state: present
@ -106,13 +106,13 @@ test_cases:
- command: [/testbin/opkg, --version]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/opkg, list-installed, zlib-dev]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/opkg, install, zlib-dev=1.2.11-6]
environ: *env-def
rc: 0
@ -123,13 +123,13 @@ test_cases:
Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib_1.2.11-6_mips_24kc.ipk
Configuring zlib.
Configuring zlib-dev.
err: ""
err: ''
- command: [/testbin/opkg, list-installed, zlib-dev]
environ: *env-def
rc: 0
out: "zlib-dev - 1.2.11-6 \n" # This output has the extra space at the end, to satisfy the behaviour of Yocto/OpenEmbedded's opkg
err: ""
- id: install_vim_updatecache
err: ''
- id: install_vim_updatecache
input:
name: vim-fuller
state: present
@ -141,18 +141,18 @@ test_cases:
- command: [/testbin/opkg, --version]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/opkg, update]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/opkg, list-installed, vim-fuller]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''
- command: [/testbin/opkg, install, vim-fuller]
environ: *env-def
rc: 0
@ -167,9 +167,9 @@ test_cases:
Configuring terminfo.
Configuring libncurses6.
Configuring vim-fuller.
err: ""
err: ''
- command: [/testbin/opkg, list-installed, vim-fuller]
environ: *env-def
rc: 0
out: "vim-fuller - 9.0-1 \n" # This output has the extra space at the end, to satisfy the behaviour of Yocto/OpenEmbedded's opkg
err: ""
err: ''

View file

@ -7,7 +7,7 @@
anchors:
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: false}
test_cases:
- id: puppet_agent_plain
- id: puppet_agent_plain
input: {}
output:
changed: false
@ -16,12 +16,12 @@ test_cases:
- command: [/testbin/puppet, config, print, agent_disabled_lockfile]
environ: *env-def
rc: 0
out: "blah, anything"
err: ""
out: blah, anything
err: ''
- command:
- /testbin/timeout
- -s
- "9"
- '9'
- 30m
- /testbin/puppet
- agent
@ -32,12 +32,12 @@ test_cases:
- --detailed-exitcodes
- --verbose
- --color
- "0"
- '0'
environ: *env-def
rc: 0
out: ""
err: ""
- id: puppet_agent_certname
out: ''
err: ''
- id: puppet_agent_certname
input:
certname: potatobox
output:
@ -47,12 +47,12 @@ test_cases:
- command: [/testbin/puppet, config, print, agent_disabled_lockfile]
environ: *env-def
rc: 0
out: "blah, anything"
err: ""
out: blah, anything
err: ''
- command:
- /testbin/timeout
- -s
- "9"
- '9'
- 30m
- /testbin/puppet
- agent
@ -63,13 +63,13 @@ test_cases:
- --detailed-exitcodes
- --verbose
- --color
- "0"
- '0'
- --certname=potatobox
environ: *env-def
rc: 0
out: ""
err: ""
- id: puppet_agent_tags_abc
out: ''
err: ''
- id: puppet_agent_tags_abc
input:
tags: [a, b, c]
output:
@ -79,12 +79,12 @@ test_cases:
- command: [/testbin/puppet, config, print, agent_disabled_lockfile]
environ: *env-def
rc: 0
out: "blah, anything"
err: ""
out: blah, anything
err: ''
- command:
- /testbin/timeout
- -s
- "9"
- '9'
- 30m
- /testbin/puppet
- agent
@ -95,14 +95,14 @@ test_cases:
- --detailed-exitcodes
- --verbose
- --color
- "0"
- '0'
- --tags
- a,b,c
environ: *env-def
rc: 0
out: ""
err: ""
- id: puppet_agent_skip_tags_def
out: ''
err: ''
- id: puppet_agent_skip_tags_def
input:
skip_tags: [d, e, f]
output:
@ -112,12 +112,12 @@ test_cases:
- command: [/testbin/puppet, config, print, agent_disabled_lockfile]
environ: *env-def
rc: 0
out: "blah, anything"
err: ""
out: blah, anything
err: ''
- command:
- /testbin/timeout
- -s
- "9"
- '9'
- 30m
- /testbin/puppet
- agent
@ -128,14 +128,14 @@ test_cases:
- --detailed-exitcodes
- --verbose
- --color
- "0"
- '0'
- --skip_tags
- d,e,f
environ: *env-def
rc: 0
out: ""
err: ""
- id: puppet_agent_noop_false
out: ''
err: ''
- id: puppet_agent_noop_false
input:
noop: false
output:
@ -145,12 +145,12 @@ test_cases:
- command: [/testbin/puppet, config, print, agent_disabled_lockfile]
environ: *env-def
rc: 0
out: "blah, anything"
err: ""
out: blah, anything
err: ''
- command:
- /testbin/timeout
- -s
- "9"
- '9'
- 30m
- /testbin/puppet
- agent
@ -161,13 +161,13 @@ test_cases:
- --detailed-exitcodes
- --verbose
- --color
- "0"
- '0'
- --no-noop
environ: *env-def
rc: 0
out: ""
err: ""
- id: puppet_agent_noop_true
out: ''
err: ''
- id: puppet_agent_noop_true
input:
noop: true
output:
@ -177,12 +177,12 @@ test_cases:
- command: [/testbin/puppet, config, print, agent_disabled_lockfile]
environ: *env-def
rc: 0
out: "blah, anything"
err: ""
out: blah, anything
err: ''
- command:
- /testbin/timeout
- -s
- "9"
- '9'
- 30m
- /testbin/puppet
- agent
@ -193,13 +193,13 @@ test_cases:
- --detailed-exitcodes
- --verbose
- --color
- "0"
- '0'
- --noop
environ: *env-def
rc: 0
out: ""
err: ""
- id: puppet_agent_waitforlock
out: ''
err: ''
- id: puppet_agent_waitforlock
input:
waitforlock: 30
output:
@ -209,12 +209,12 @@ test_cases:
- command: [/testbin/puppet, config, print, agent_disabled_lockfile]
environ: *env-def
rc: 0
out: "blah, anything"
err: ""
out: blah, anything
err: ''
- command:
- /testbin/timeout
- -s
- "9"
- '9'
- 30m
- /testbin/puppet
- agent
@ -225,10 +225,10 @@ test_cases:
- --detailed-exitcodes
- --verbose
- --color
- "0"
- '0'
- --waitforlock
- "30"
- '30'
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''

View file

@ -14,12 +14,12 @@ anchors:
Please report bugs to <https://gitlab.xfce.org/xfce/xfconf>.
test_cases:
- id: test_missing_input
- id: test_missing_input
input: {}
output:
failed: true
msg: "missing required arguments: channel, property"
- id: test_property_set_property
msg: 'missing required arguments: channel, property'
- id: test_property_set_property
input:
channel: xfwm4
property: /general/inactive_opacity
@ -31,25 +31,25 @@ test_cases:
previous_value: '100'
type: int
value: '90'
version: "4.18.1"
version: 4.18.1
mocks:
run_command:
- command: [/testbin/xfconf-query, --version]
environ: *env-def
rc: 0
out: *version-output
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/inactive_opacity]
environ: *env-def
rc: 0
out: "100\n"
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/inactive_opacity, --create, --type, int, --set, '90']
environ: *env-def
rc: 0
out: ""
err: ""
- id: test_property_set_property_same_value
out: ''
err: ''
- id: test_property_set_property_same_value
input:
channel: xfwm4
property: /general/inactive_opacity
@ -61,25 +61,25 @@ test_cases:
previous_value: '90'
type: int
value: '90'
version: "4.18.1"
version: 4.18.1
mocks:
run_command:
- command: [/testbin/xfconf-query, --version]
environ: *env-def
rc: 0
out: *version-output
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/inactive_opacity]
environ: *env-def
rc: 0
out: "90\n"
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/inactive_opacity, --create, --type, int, --set, '90']
environ: *env-def
rc: 0
out: ""
err: ""
- id: test_property_set_property_bool_false
out: ''
err: ''
- id: test_property_set_property_bool_false
input:
channel: xfce4-session
property: /general/SaveOnExit
@ -91,25 +91,25 @@ test_cases:
previous_value: 'true'
type: bool
value: 'False'
version: "4.18.1"
version: 4.18.1
mocks:
run_command:
- command: [/testbin/xfconf-query, --version]
environ: *env-def
rc: 0
out: *version-output
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfce4-session, --property, /general/SaveOnExit]
environ: *env-def
rc: 0
out: "true\n"
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfce4-session, --property, /general/SaveOnExit, --create, --type, bool, --set, 'false']
environ: *env-def
rc: 0
out: "false\n"
err: ""
- id: test_property_set_array
err: ''
- id: test_property_set_array
input:
channel: xfwm4
property: /general/workspace_names
@ -121,19 +121,19 @@ test_cases:
previous_value: [Main, Work, Tmp]
type: [string, string, string]
value: [A, B, C]
version: "4.18.1"
version: 4.18.1
mocks:
run_command:
- command: [/testbin/xfconf-query, --version]
environ: *env-def
rc: 0
out: *version-output
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/workspace_names]
environ: *env-def
rc: 0
out: "Value is an array with 3 items:\n\nMain\nWork\nTmp\n"
err: ""
err: ''
- command:
- /testbin/xfconf-query
- --channel
@ -156,9 +156,9 @@ test_cases:
- C
environ: *env-def
rc: 0
out: ""
err: ""
- id: test_property_set_array_to_same_value
out: ''
err: ''
- id: test_property_set_array_to_same_value
input:
channel: xfwm4
property: /general/workspace_names
@ -170,19 +170,19 @@ test_cases:
previous_value: [A, B, C]
type: [string, string, string]
value: [A, B, C]
version: "4.18.1"
version: 4.18.1
mocks:
run_command:
- command: [/testbin/xfconf-query, --version]
environ: *env-def
rc: 0
out: *version-output
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/workspace_names]
environ: *env-def
rc: 0
out: "Value is an array with 3 items:\n\nA\nB\nC\n"
err: ""
err: ''
- command:
- /testbin/xfconf-query
- --channel
@ -205,9 +205,9 @@ test_cases:
- C
environ: *env-def
rc: 0
out: ""
err: ""
- id: test_property_reset_value
out: ''
err: ''
- id: test_property_reset_value
input:
channel: xfwm4
property: /general/workspace_names
@ -217,21 +217,21 @@ test_cases:
previous_value: [A, B, C]
type:
value:
version: "4.18.1"
version: 4.18.1
mocks:
run_command:
- command: [/testbin/xfconf-query, --version]
environ: *env-def
rc: 0
out: *version-output
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/workspace_names]
environ: *env-def
rc: 0
out: "Value is an array with 3 items:\n\nA\nB\nC\n"
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/workspace_names, --reset]
environ: *env-def
rc: 0
out: ""
err: ""
out: ''
err: ''

View file

@ -14,88 +14,88 @@ anchors:
Please report bugs to <https://gitlab.xfce.org/xfce/xfconf>.
test_cases:
- id: test_simple_property_get
- id: test_simple_property_get
input:
channel: xfwm4
property: /general/inactive_opacity
output:
value: '100'
is_array: false
version: "4.18.1"
version: 4.18.1
mocks:
run_command:
- command: [/testbin/xfconf-query, --version]
environ: *env-def
rc: 0
out: *version-output
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/inactive_opacity]
environ: *env-def
rc: 0
out: "100\n"
err: ""
- id: test_simple_property_get_nonexistent
err: ''
- id: test_simple_property_get_nonexistent
input:
channel: xfwm4
property: /general/i_dont_exist
output:
version: "4.18.1"
version: 4.18.1
mocks:
run_command:
- command: [/testbin/xfconf-query, --version]
environ: *env-def
rc: 0
out: *version-output
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/i_dont_exist]
environ: *env-def
rc: 1
out: ""
err: 'Property "/general/i_dont_exist" does not exist on channel "xfwm4".\n'
- id: test_property_no_channel
out: ''
err: Property "/general/i_dont_exist" does not exist on channel "xfwm4".\n
- id: test_property_no_channel
input:
property: /general/i_dont_exist
output:
failed: true
msg: "missing parameter(s) required by 'property': channel"
- id: test_property_get_array
- id: test_property_get_array
input:
channel: xfwm4
property: /general/workspace_names
output:
is_array: true
value_array: [Main, Work, Tmp]
version: "4.18.1"
version: 4.18.1
mocks:
run_command:
- command: [/testbin/xfconf-query, --version]
environ: *env-def
rc: 0
out: *version-output
err: ""
err: ''
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/workspace_names]
environ: *env-def
rc: 0
out: "Value is an array with 3 items:\n\nMain\nWork\nTmp\n"
err: ""
- id: get_channels
err: ''
- id: get_channels
input: {}
output:
channels: [a, b, c]
version: "4.18.1"
version: 4.18.1
mocks:
run_command:
- command: [/testbin/xfconf-query, --version]
environ: *env-def
rc: 0
out: *version-output
err: ""
err: ''
- command: [/testbin/xfconf-query, --list]
environ: *env-def
rc: 0
out: "Channels:\n a\n b\n c\n"
err: ""
- id: get_properties
err: ''
- id: get_properties
input:
channel: xfwm4
output:
@ -106,14 +106,14 @@ test_cases:
- /general/wrap_windows
- /general/wrap_workspaces
- /general/zoom_desktop
version: "4.18.1"
version: 4.18.1
mocks:
run_command:
- command: [/testbin/xfconf-query, --version]
environ: *env-def
rc: 0
out: *version-output
err: ""
err: ''
- command: [/testbin/xfconf-query, --list, --channel, xfwm4]
environ: *env-def
rc: 0
@ -124,4 +124,4 @@ test_cases:
/general/wrap_windows
/general/wrap_workspaces
/general/zoom_desktop
err: ""
err: ''