tests: don't use beakerlib in blueprint

b/c for osbuild-composer beakerlib is not included in the
distributions we test on.
This commit is contained in:
Lars Karlitski 2019-12-08 00:48:17 +01:00 committed by Brian C. Lane
parent 123827c90a
commit abcbbf3194

View File

@ -34,47 +34,48 @@ rlJournalStart
rlPhaseStartTest "blueprints push"
cat > beakerlib.toml << __EOF__
name = "beakerlib"
description = "Start building tests with beakerlib."
BLUEPRINT_NAME="openssh-server"
cat > $BLUEPRINT_NAME.toml << __EOF__
name = "$BLUEPRINT_NAME"
description = "Simple blueprint including only openssh"
version = "0.0.1"
modules = []
groups = []
[[packages]]
name = "beakerlib"
name = "openssh-server"
version = "*"
__EOF__
rlRun -t -c "$CLI blueprints push beakerlib.toml"
rlAssertEquals "pushed bp is found via list" "`$CLI blueprints list | grep beakerlib`" "beakerlib"
rlRun -t -c "$CLI blueprints push $BLUEPRINT_NAME.toml"
rlAssertEquals "pushed bp is found via list" "`$CLI blueprints list | grep $BLUEPRINT_NAME`" "$BLUEPRINT_NAME"
rlPhaseEnd
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
rlPhaseStartTest "SemVer .patch version is incremented automatically"
# 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
cat >> beakerlib.toml << __EOF__
cat >> $BLUEPRINT_NAME.toml << __EOF__
[[packages]]
name = "php"
version = "*"
__EOF__
# push again
rlRun -t -c "$CLI blueprints push beakerlib.toml"
rlRun -t -c "$CLI blueprints push $BLUEPRINT_NAME.toml"
# official documentation says:
# If a new blueprint is uploaded with the same version the server will
# automatically bump the PATCH level of the version. If the version
# 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
rlPhaseStartTest "blueprints delete"
rlRun -t -c "$CLI blueprints delete beakerlib"
rlAssertEquals "bp not found after delete" "`$CLI blueprints list | grep beakerlib`" ""
rlRun -t -c "$CLI blueprints delete $BLUEPRINT_NAME"
rlAssertEquals "bp not found after delete" "`$CLI blueprints list | grep $BLUEPRINT_NAME`" ""
rlPhaseEnd
rlPhaseStartTest "start a compose with deleted blueprint"
@ -105,5 +106,9 @@ __EOF__
unset compose_id
rlPhaseEnd
rlPhaseStartCleanup
rlRun -t -c "rm *.toml"
rlPhaseEnd
rlJournalEnd
rlJournalPrintText