#774 [beaker-tests-sanity] test bootstrap feature, see #764
Merged 4 years ago by msuchy. Opened 4 years ago by frostyx.
copr/ frostyx/copr test-bootstrap  into  master

@@ -0,0 +1,12 @@ 

+ #!/bin/sh

+ 

+ HELLO=https://frostyx.fedorapeople.org/hello-2.8-1.fc23.src.rpm

+ EVIL_HELLO=https://frostyx.fedorapeople.org/evilhello-2.8-1.fc28.src.rpm

+ 

+ parse_build_id()

+ {

+    local id

+    id=$(grep 'Created builds:' "$rlRun_LOG" | sed 's/.* //')

+    test -n "$id" || return 1

+    export BUILD_ID=$id

+ }

@@ -6,16 +6,10 @@ 

  # Load config settings

  HERE=$(dirname "$(realpath "$0")")

  source "$HERE/config"

+ source "$HERE/helpers"

  

  export RESULTDIR=`mktemp -d`

  

- parse_build_id()

- {

-    local id

-    id=$(grep 'Created builds:' "$rlRun_LOG" | sed 's/.* //')

-    test -n "$id" || return 1

-    export BUILD_ID=$id

- }

  

  cleanup_resultdir ()

  (

@@ -7,8 +7,7 @@ 

  # Load config settings

  HERE=$(dirname "$(realpath "$0")")

  source "$HERE/config"

- 

- HELLO=https://frostyx.fedorapeople.org/hello-2.8-1.fc23.src.rpm

+ source "$HERE/helpers"

  

  

  rlJournalStart

@@ -32,9 +32,7 @@ 

  # Load config settings

  HERE=$(dirname "$(realpath "$0")")

  source "$HERE/config"

- 

- HELLO=https://frostyx.fedorapeople.org/hello-2.8-1.fc23.src.rpm

- EVIL_HELLO=https://frostyx.fedorapeople.org/evilhello-2.8-1.fc28.src.rpm

+ source "$HERE/helpers"

  

  

  rlJournalStart
@@ -535,6 +533,10 @@ 

          # test use_bootstrap_container setting

          rlRun "copr-cli create ${NAME_PREFIX}BootstrapProject --use-bootstrap on --chroot $CHROOT"

          rlAssertEquals "" `curl --silent ${FRONTEND_URL}/api/coprs/${NAME_PREFIX}BootstrapProject/detail/ |jq '.detail.use_bootstrap_container'` true

+         rlRun -s "copr-cli build ${NAME_PREFIX}BootstrapProject $HELLO --nowait"

+         rlRun "parse_build_id"

+         rlRun "copr watch-build $BUILD_ID"

+         rlRun "curl $BACKEND_URL/results/${NAME_PREFIX}BootstrapProject/$CHROOT/`printf %08d $BUILD_ID`-hello/configs/child.cfg |grep \"config_opts\['use_bootstrap_container'\] = True\""

          rlRun "copr-cli modify ${NAME_PREFIX}BootstrapProject --use-bootstrap off"

          rlAssertEquals "" `curl --silent ${FRONTEND_URL}/api/coprs/${NAME_PREFIX}BootstrapProject/detail/ |jq '.detail.use_bootstrap_container'` false

  

We are already testing whether

copr-cli create/modify ... --use-bootstrap on/off

works. I am just adding a test to create a build when the
bootstrap is on.

Better than nothing; but we don't see whether the 'mock --bootstrap-container' was actually used. We would have to check the build-live.log for some patterns, I guess.

That's true. We only know that it is configured in frontend. I will try to check it in a build log or mock config.

I will try to check it in a build log or mock config.

Ok, adding needs-work tag.

Metadata Update from @praiskup:
- Pull-request tagged with: needs-work

4 years ago

rebased onto e04936a5c2c226fa9b46afa9d50d9ed9f7c6db52

4 years ago

Better than nothing; but we don't see whether the 'mock --bootstrap-container' was actually used. We would have to check the build-live.log for some patterns, I guess.

Ok, adding needs-work tag.

I've added a test to check mock config. What do you think?

Metadata Update from @frostyx:
- Pull-request untagged with: needs-work

4 years ago

rebased onto f25fa09

4 years ago

Pull-Request has been merged by msuchy

4 years ago