[netinstall] Extend tests with YAML syntax error and no-files-at-all
This commit is contained in:
parent
850825f70f
commit
9569105575
@ -342,9 +342,11 @@ ItemTests::testUrlFallback_data()
|
|||||||
|
|
||||||
using S = Config::Status;
|
using S = Config::Status;
|
||||||
|
|
||||||
QTest::newRow( "bad" ) << "1a-single-bad.conf" << smash( S::FailedBadData ) << 0;
|
QTest::newRow( "bad" ) << "1a-single-bad.conf" << smash( S::FailedBadConfiguration ) << 0;
|
||||||
QTest::newRow( "empty" ) << "1a-single-empty.conf" << smash( S::FailedNoData ) << 0;
|
QTest::newRow( "empty" ) << "1a-single-empty.conf" << smash( S::FailedNoData ) << 0;
|
||||||
|
QTest::newRow( "error" ) << "1a-single-error.conf" << smash( S::FailedBadData ) << 0;
|
||||||
QTest::newRow( "second" ) << "1b-single-small.conf" << smash( S::Ok ) << 2;
|
QTest::newRow( "second" ) << "1b-single-small.conf" << smash( S::Ok ) << 2;
|
||||||
|
QTest::newRow( "none" ) << "1c-none.conf" << smash( S::FailedNoData ) << 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
7
src/modules/netinstall/tests/1a-single-error.conf
Normal file
7
src/modules/netinstall/tests/1a-single-error.conf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# SPDX-FileCopyrightText: no
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
#
|
||||||
|
---
|
||||||
|
required: true
|
||||||
|
groupsUrl:
|
||||||
|
- file://$TESTDIR/data-error.yaml
|
6
src/modules/netinstall/tests/1c-none.conf
Normal file
6
src/modules/netinstall/tests/1c-none.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# SPDX-FileCopyrightText: no
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
#
|
||||||
|
---
|
||||||
|
required: true
|
||||||
|
groupsUrl: []
|
5
src/modules/netinstall/tests/data-error.yaml
Normal file
5
src/modules/netinstall/tests/data-error.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
derp
|
||||||
|
derp
|
||||||
|
herpa-derp: no
|
||||||
|
--
|
||||||
|
# This file is not valid YAML
|
Loading…
Reference in New Issue
Block a user