From 3734129e67b04a960ac7e813e2a22a69cfca8a1b Mon Sep 17 00:00:00 2001 From: Lars Karlitski Date: Sun, 8 Dec 2019 00:48:17 +0100 Subject: [PATCH] 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 abcbbf31941be7b46089a09e3f8a80f4de309f23 Related: rhbz#1825190 --- tests/cli/test_blueprints_sanity.sh | 30 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/tests/cli/test_blueprints_sanity.sh b/tests/cli/test_blueprints_sanity.sh index 702391bf..2bdf458f 100755 --- a/tests/cli/test_blueprints_sanity.sh +++ b/tests/cli/test_blueprints_sanity.sh @@ -34,48 +34,49 @@ 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" @@ -106,6 +107,9 @@ __EOF__ unset compose_id rlPhaseEnd + rlPhaseStartCleanup + rlRun -t -c "rm *.toml" + rlPhaseEnd rlJournalEnd rlJournalPrintText