#14 tests: add first batch of ruby tests
Closed a year ago by pvalena. Opened 3 years ago by mvadkert.
rpms/ mvadkert/ruby feature/first-batch-of-tests  into  master

file modified
+1
@@ -2,3 +2,4 @@ 

  /ruby-2.*.tar.bz2

  /ruby-2.*.tar.xz

  /*.rpm

+ !tests

Is this just precautionary measure, or you do really intend to have tests folder include rpms and archives?

file added
+71
@@ -0,0 +1,71 @@ 

+ ---

+ #

+ # Tests to run in a classic environment

+ #

+ - hosts: localhost

+   roles:

+   - role: standard-test-beakerlib

+ 

+     tags:

+     - classic

+     - container

+ 

+     repositories:

+     - repo: "https://src.fedoraproject.org/tests/ruby.git"

+       dest: "shared"

+ 

+     tests:

+     # disabled for now as unit tests for bundler >= 1.16 contain a lot of failures

+     # when executed the "old" way, needs fixes ...

+     # - shared/bundler-unit-tests

+     - shared/run-basic-rails-application

+     - shared/systemtap-static-probes-in-ruby

+ 

+     required_packages:

+     #

+     # required by bundler-unit-tests

+     #

+     - rubygem-bundler

+     - rubygem-thor

+     - rubygem-rdoc

+     - rubygem-net-http-persistent

+     - rubygem-psych

+     - rubygem-rspec

+     - rpm-build

+     #

+     # required by run-basic-rails-application

+     #

+     - rubygem-rails

+     - sqlite-devel

+     - libxml2-devel

+     - libxslt-devel

+     - gcc-c++

+     - net-tools

+     - procps-ng

+     - automake

+     - libtool

+     #

+     # required by systemtap-static-probes-in-ruby

+     #

+     - ruby-doc

+     - ruby-libs

+     - systemtap

+     - grep

+     - procps-ng

+     #

+     # general requirements

+     #

+     - rubygems

+     - rubygems-devel

+     - ruby

+     - ruby-devel

+     - ansible

+     - git

+ 

+ #

+ # Tests for atomic host

+ #

+ - hosts: localhost

+   tags:

+   - atomic

+   # no compatible tests

This patch adds 2 shared ruby tests according to the standard test interface specification [1]. More information about Fedora CI can be found here [2].

Note that the bundler-unit-tests test is disabled for now, as it fails with recent bundler 1.16+ and needs additional fixes.

These tests are ported from downstream and are compatible with RHEL6/RHEL7/CentOS6/CentOS7 and various SCL collection.

To execute the tests on localhost follow the execution as described on the wiki [3].

Note that these tests are not yet gating ruby updates, but that is expected to change in the future.

This is a collaboration on request from Vit Ondruch.

[1] http://fedoraproject.org/wiki/CI/Standard_Test_Interface
[2] https://fedoraproject.org/wiki/CI
[3] https://fedoraproject.org/wiki/CI/Tests#Running_tests

Signed-off-by: Miroslav Vadkerti mvadkert@redhat.com

@mvadkert Thanks for the big contribution.

Right now I checked the test file seeing https://fedoraproject.org/wiki/CI/Tests page.
I got 1 failure after running the test.
Did you succeed to pass the test on your side?
I guess you forgot to push the file: tests/pkgs-atomic_container.yml .

$ sudo dnf install ansible python2-dnf libselinux-python standard-test-roles

$ git checkout feature/first-batch-of-tests
Branch feature/first-batch-of-tests set up to track remote branch feature/first-batch-of-tests from mvakert.
Switched to a new branch 'feature/first-batch-of-tests'

$ cd tests/

$ ansible-playbook tests.yml
...
fatal: [localhost]: FAILED! => {"reason": "Unable to retrieve file contents\nCould not find or access '/home/jaruga/git/fedora-packages/ruby/tests/pkgs-atomic_container.yml'"}
  to retry, use: --limit @/home/jaruga/git/fedora-packages/ruby/tests/tests.retry
 ____________
< PLAY RECAP >
 ------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

localhost                  : ok=11   changed=2    unreachable=0    failed=1  

I just found Ruby is introduced in the CI example page. :)
https://fedoraproject.org/wiki/CI/Share_Test_Code#Ruby

Is this just precautionary measure, or you do really intend to have tests folder include rpms and archives?

Pull-Request has been closed by pvalena

a year ago