tests: don't use beakerlib in blueprint
b/c for osbuild-composer beakerlib is not included in the
distributions we test on.
Cherry-picked from abcbbf3194
Related: rhbz#1825190
This commit is contained in:
parent
8f860cc8a1
commit
3734129e67
@ -34,48 +34,49 @@ rlJournalStart
|
|||||||
|
|
||||||
rlPhaseStartTest "blueprints push"
|
rlPhaseStartTest "blueprints push"
|
||||||
|
|
||||||
cat > beakerlib.toml << __EOF__
|
BLUEPRINT_NAME="openssh-server"
|
||||||
name = "beakerlib"
|
cat > $BLUEPRINT_NAME.toml << __EOF__
|
||||||
description = "Start building tests with beakerlib."
|
name = "$BLUEPRINT_NAME"
|
||||||
|
description = "Simple blueprint including only openssh"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
modules = []
|
modules = []
|
||||||
groups = []
|
groups = []
|
||||||
|
|
||||||
[[packages]]
|
[[packages]]
|
||||||
name = "beakerlib"
|
name = "openssh-server"
|
||||||
version = "*"
|
version = "*"
|
||||||
__EOF__
|
__EOF__
|
||||||
|
|
||||||
rlRun -t -c "$CLI blueprints push beakerlib.toml"
|
rlRun -t -c "$CLI blueprints push $BLUEPRINT_NAME.toml"
|
||||||
rlAssertEquals "pushed bp is found via list" "`$CLI blueprints list | grep beakerlib`" "beakerlib"
|
rlAssertEquals "pushed bp is found via list" "`$CLI blueprints list | grep $BLUEPRINT_NAME`" "$BLUEPRINT_NAME"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "blueprints show"
|
rlPhaseStartTest "blueprints show"
|
||||||
rlAssertEquals "show displays blueprint in TOML" "`$CLI blueprints show beakerlib`" "`cat beakerlib.toml`"
|
rlAssertEquals "show displays blueprint in TOML" "`$CLI blueprints show $BLUEPRINT_NAME`" "`cat $BLUEPRINT_NAME.toml`"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "SemVer .patch version is incremented automatically"
|
rlPhaseStartTest "SemVer .patch version is incremented automatically"
|
||||||
# version is still 0.0.1
|
# version is still 0.0.1
|
||||||
rlAssertEquals "version is 0.0.1" "`$CLI blueprints show beakerlib | grep 0.0.1`" 'version = "0.0.1"'
|
rlAssertEquals "version is 0.0.1" "`$CLI blueprints show $BLUEPRINT_NAME | grep 0.0.1`" 'version = "0.0.1"'
|
||||||
# add a new package to the existing blueprint
|
# add a new package to the existing blueprint
|
||||||
cat >> beakerlib.toml << __EOF__
|
cat >> $BLUEPRINT_NAME.toml << __EOF__
|
||||||
|
|
||||||
[[packages]]
|
[[packages]]
|
||||||
name = "php"
|
name = "php"
|
||||||
version = "*"
|
version = "*"
|
||||||
__EOF__
|
__EOF__
|
||||||
# push again
|
# push again
|
||||||
rlRun -t -c "$CLI blueprints push beakerlib.toml"
|
rlRun -t -c "$CLI blueprints push $BLUEPRINT_NAME.toml"
|
||||||
# official documentation says:
|
# official documentation says:
|
||||||
# If a new blueprint is uploaded with the same version the server will
|
# If a new blueprint is uploaded with the same version the server will
|
||||||
# automatically bump the PATCH level of the version. If the version
|
# automatically bump the PATCH level of the version. If the version
|
||||||
# doesn't match it will be used as is.
|
# doesn't match it will be used as is.
|
||||||
rlAssertEquals "version is 0.0.2" "`$CLI blueprints show beakerlib | grep 0.0.2`" 'version = "0.0.2"'
|
rlAssertEquals "version is 0.0.2" "`$CLI blueprints show $BLUEPRINT_NAME | grep 0.0.2`" 'version = "0.0.2"'
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "blueprints delete"
|
rlPhaseStartTest "blueprints delete"
|
||||||
rlRun -t -c "$CLI blueprints delete beakerlib"
|
rlRun -t -c "$CLI blueprints delete $BLUEPRINT_NAME"
|
||||||
rlAssertEquals "bp not found after delete" "`$CLI blueprints list | grep beakerlib`" ""
|
rlAssertEquals "bp not found after delete" "`$CLI blueprints list | grep $BLUEPRINT_NAME`" ""
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "start a compose with deleted blueprint"
|
rlPhaseStartTest "start a compose with deleted blueprint"
|
||||||
@ -106,6 +107,9 @@ __EOF__
|
|||||||
unset compose_id
|
unset compose_id
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun -t -c "rm *.toml"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
rlJournalEnd
|
rlJournalEnd
|
||||||
rlJournalPrintText
|
rlJournalPrintText
|
||||||
|
Loading…
Reference in New Issue
Block a user