diff --git a/src/modules/netinstall/Tests.cpp b/src/modules/netinstall/Tests.cpp index ff7d8b253..9f38f6fbf 100644 --- a/src/modules/netinstall/Tests.cpp +++ b/src/modules/netinstall/Tests.cpp @@ -349,8 +349,14 @@ ItemTests::testUrlFallback_data() QTest::newRow( "five" ) << "1b-single-large.conf" << smash( S::Ok ) << 5; QTest::newRow( "none" ) << "1c-none.conf" << smash( S::FailedNoData ) << 0; QTest::newRow( "unset" ) << "1c-unset.conf" << smash( S::FailedNoData ) << 0; + // Finds small, then stops QTest::newRow( "fallback-small" ) << "1d-fallback-small.conf" << smash( S::Ok ) << 2; + // Finds large, then stops QTest::newRow( "fallback-large" ) << "1d-fallback-large.conf" << smash( S::Ok ) << 5; + // Finds empty, finds small + QTest::newRow( "fallback-mixed" ) << "1d-fallback-mixed.conf" << smash( S::Ok ) << 2; + // Finds empty, then bad + QTest::newRow( "fallback-bad" ) << "1d-fallback-bad.conf" << smash( S::FailedBadConfiguration ) << 0; } void diff --git a/src/modules/netinstall/tests/1d-fallback-bad.conf b/src/modules/netinstall/tests/1d-fallback-bad.conf new file mode 100644 index 000000000..1a36f7854 --- /dev/null +++ b/src/modules/netinstall/tests/1d-fallback-bad.conf @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +--- +required: true +groupsUrl: + - file://$TESTDIR/data-nonexistent.yaml + - file://$TESTDIR/data-empty.yaml + - file://$TESTDIR/data-empty.yaml + - file://$TESTDIR/data-bad.yaml diff --git a/src/modules/netinstall/tests/1d-fallback-mixed.conf b/src/modules/netinstall/tests/1d-fallback-mixed.conf new file mode 100644 index 000000000..79cf677f9 --- /dev/null +++ b/src/modules/netinstall/tests/1d-fallback-mixed.conf @@ -0,0 +1,13 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +--- +required: true +groupsUrl: + - file://$TESTDIR/data-nonexistent.yaml + - file://$TESTDIR/data-empty.yaml + - file://$TESTDIR/data-bad.yaml + - file://$TESTDIR/data-empty.yaml + - file://$TESTDIR/data-small.yaml + - file://$TESTDIR/data-large.yaml + - file://$TESTDIR/data-bad.yaml