#75 Update modularity tests
Merged 6 years ago by clime. Opened 6 years ago by frostyx.
copr/ frostyx/copr modularity-tests  into  master

@@ -87,12 +87,35 @@ 

          # @TODO Test that MBS api is not accessible

          # Not yet configured

  

+         # Test that module builds succeeded

+         PACKAGES=`mktemp`

+         STARTED=$(date +%s)

+ 

+         # Wait until all module packages are built or timeout after 10 minutes

+         while :; do

+             now=$(date +%s)

+             copr-cli list-packages module-testmodule-beakertest-$DATE --with-all-builds > $PACKAGES

+             if [ `cat $PACKAGES |grep state |grep "succeeded\|failed" |wc -l` -eq 3 ]; then break; fi;

+             if [ $(($now - 600)) -gt $STARTED ]; then break; fi;

+             sleep 10

+         done

+ 

+         rlAssertEquals "All packages should succeed" `cat $PACKAGES |grep "state" | grep "succeeded" |wc -l` 3

+         for pkg in "module-build-macros" "ed" "mksh"; do

+             rlAssertEquals "Package $pkg is missing" `cat $PACKAGES | grep "name" |grep "$pkg" |wc -l` 1

+         done

+ 

          # @TODO Test that module succeeded

-         # We should wait in loop (with some timeout)

-         # and check builds and module state

+         # We need to implement API for retrieving modules or at least

+         # make a reliable way to fetch its state from web UI

+ 

+         # @TODO Test that it is possible to build module

+         # with few hundreds of packages

  

          # @TODO Test that module can be enabled with dnf

-         # Feature for enabling module from Copr is not in upstream

+         # We should test this against DNF from

+         # https://copr.fedorainfracloud.org/coprs/mhatina/DNF-Modules/

+         # Problem is that docker image is F25 and DNF is built only for F26

  

          # @TODO Test that enabled module info is correct

          # Feature for enabling module from Copr is not in upstream

I've updated @TODOs of missing modularity tests and also implement one of them

Until now, we only tested whether module is successfully submitted into MBS and don't care any more. I've added test for checking whether all the packages was successfully built.

We don't have API for retrieving modules yet, so I did't check whether the module as whole is marked as successful when it should be and also I couldn't check whether it is possible to enable and install the module on the client's system because DNF with modularity support is available only for F26 and rawhide and our docker env is F25.

I will implement these tests later, once it is possible.

Pull-Request has been merged by clime

6 years ago