Keep watching a workflow with modularity-testing-framework will be stable.stream-ruby-3.1-rhel-9.3.0
parent
a7cbd8ce37
commit
92fcf2522e
@ -1,28 +1,16 @@
|
||||
FROM registry.fedoraproject.org/fedora:26
|
||||
# A workflow with docker is still uncertain.
|
||||
# Keep watching below file and other module's situation.
|
||||
# https://github.com/container-images/container-image-template/blob/master/Dockerfile.template
|
||||
FROM registry.fedoraproject.org/f26-modular/boltron
|
||||
|
||||
# ruby image for OpenShift.
|
||||
#
|
||||
# Environment:
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
|
||||
ENV NAME=ruby ARCH=x86_64
|
||||
LABEL MAINTAINER "Jun Aruga" <jaruga@redhat.com>
|
||||
LABEL summary="An interpreter of object-oriented scripting language" \
|
||||
name="$FGC/$NAME" \
|
||||
version="0" \
|
||||
release="1.$DISTTAG" \
|
||||
architecture="$ARCH" \
|
||||
com.redhat.component=$NAME \
|
||||
usage="docker run f26/ruby" \
|
||||
help="Runs ruby. No dependencies. See Help File below for more details." \
|
||||
description="An interpreter of object-oriented scripting language" \
|
||||
io.k8s.description="An interpreter of object-oriented scripting language" \
|
||||
io.k8s.diplay-name="Ruby 2.4 " \
|
||||
io.openshift.tags="ruby"
|
||||
ENV LC_CTYPE C.UTF-8
|
||||
|
||||
RUN dnf install -y --setopt=tsflags=nodocs ruby && \
|
||||
dnf -y clean all
|
||||
|
||||
# ruby will be run under standard user on Fedora
|
||||
USER 1000
|
||||
RUN dnf -y update
|
||||
RUN dnf -y --nodocs install \
|
||||
ruby \
|
||||
&& dnf -y clean all
|
||||
|
||||
CMD /bin/bash
|
||||
|
@ -1,16 +1,8 @@
|
||||
IMAGE_NAME = ruby
|
||||
|
||||
MODULEMDURL=file://ruby.yaml
|
||||
|
||||
default: run
|
||||
default: test
|
||||
|
||||
build:
|
||||
docker build --tag=$(IMAGE_NAME) .
|
||||
|
||||
run: build
|
||||
docker run -d $(IMAGE_NAME)
|
||||
|
||||
test: build
|
||||
cd tests; MODULE=docker MODULEMD=$(MODULEMDURL) URL="docker=$(IMAGE_NAME)" make all
|
||||
cd tests; MODULE=rpm MODULEMD=$(MODULEMDURL) URL="docker=$(IMAGE_NAME)" make all
|
||||
docker build -t ruby .
|
||||
docker run -d ruby
|
||||
|
||||
test:
|
||||
$(MAKE) -C tests $@
|
||||
|
@ -1,7 +1,14 @@
|
||||
MODULE_LINT=/usr/share/moduleframework/tools/modulelint.py
|
||||
# --filter-by-tags=-WIP: ignore WIP tag test that have a issue on F25 avocado.
|
||||
CMD=python -m avocado run --filter-by-tags=-WIP $(MODULE_LINT) *.py
|
||||
|
||||
# A workflow with modularity-testing-framework is still uncertain.
|
||||
# Only nspawn is actually used.
|
||||
# https://meta-test-family.readthedocs.io/en/latest/index.html
|
||||
#
|
||||
all:
|
||||
$(CMD)
|
||||
# Installation
|
||||
# $ sudo dnf install modularity-testing-framework python2-avocado
|
||||
# $ sudo /usr/bin/pip install behave
|
||||
test:
|
||||
mtf-generator
|
||||
MODULE=nspawn \
|
||||
python -d -m avocado run \
|
||||
--filter-by-tags=-WIP \
|
||||
/usr/share/moduleframework/tools/modulelint.py \
|
||||
*.py
|
||||
|
@ -1,26 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import socket
|
||||
from avocado import main
|
||||
from moduleframework import module_framework
|
||||
|
||||
class RubyTests(module_framework.AvocadoTest):
|
||||
"""
|
||||
:avocado: enable
|
||||
"""
|
||||
|
||||
def test_cmd(self):
|
||||
self.start()
|
||||
self.run("which ruby")
|
||||
|
||||
def test_version(self):
|
||||
self.start()
|
||||
self.run("ruby -v")
|
||||
|
||||
def test_hostname(self):
|
||||
self.start()
|
||||
self.run("hostname")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in new issue