Skip to content

Commit 038982b

Browse files
committed
Change scope of grub2_bootloader_argument templated tests
Some test scenarios test correct handling of *values* of bootloader arguments. But, not all arguments have values, some arguments are value-less, for example `nousb`. For the value-less arguments it doesn't make sense to test the correct handling of values. Some tests that currently attempt to do this are broken. We will fix it by disabling the test scenarios. We will use the well-known "trick" of setting the `# platform` header to `Not Applicable` if the bootloader argument isn't supposed to have any value. These are rules where the template isn't given the `arg_value` or `arg_variable` parameter. Fixes failing templated test scenario `wrong_value_entries.fail.sh` in rule `grub2_nousb_argument`.
1 parent ef45a76 commit 038982b

5 files changed

Lines changed: 21 additions & 0 deletions

File tree

shared/templates/grub2_bootloader_argument/tests/wrong_value_entries.fail.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/bash
22

3+
{{% if not ARG_VALUE and not ARG_VARIABLE %}}
4+
# platform = Not Applicable
5+
{{% else %}}
36
# platform = multi_platform_fedora,multi_platform_rhel
7+
{{% endif %}}
48
# packages = grub2,grubby
59

610
{{%- if ARG_VARIABLE %}}

shared/templates/grub2_bootloader_argument/tests/wrong_value_etcdefault.fail.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/bash
22

3+
{{% if not ARG_VALUE and not ARG_VARIABLE %}}
4+
# platform = Not Applicable
5+
{{% else %}}
36
# platform = multi_platform_all
7+
{{% endif %}}
48

59
{{%- if 'ubuntu' in product %}}
610
# packages = grub2

shared/templates/grub2_bootloader_argument/tests/wrong_value_etcdefault_dir.fail.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/bash
22

3+
{{% if not ARG_VALUE and not ARG_VARIABLE %}}
4+
# platform = Not Applicable
5+
{{% else %}}
36
# platform = multi_platform_ubuntu
7+
{{% endif %}}
48
# packages = grub2
59

610
{{%- if ARG_VARIABLE %}}

shared/templates/grub2_bootloader_argument/tests/wrong_value_etcdefaultgrub_recovery_disabled.fail.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/bash
2+
3+
{{% if not ARG_VALUE and not ARG_VARIABLE %}}
4+
# platform = Not Applicable
5+
{{% else %}}
26
# platform = multi_platform_all
7+
{{% endif %}}
38

49
{{%- if ARG_VARIABLE %}}
510
# variables = {{{ ARG_VARIABLE }}}={{{ TEST_VALUE_PASS }}}

shared/templates/grub2_bootloader_argument/tests/wrong_value_grubenv.fail.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/bash
22

3+
{{% if not ARG_VALUE and not ARG_VARIABLE %}}
4+
# platform = Not Applicable
5+
{{% else %}}
36
# platform = Oracle Linux 8,Red Hat Enterprise Linux 8
7+
{{% endif %}}
48
# packages = grub2,grubby
59

610
{{%- if ARG_VARIABLE %}}

0 commit comments

Comments
 (0)