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.
|
WORKDIR /build
|
||||||
#
|
COPY . .
|
||||||
# Environment:
|
|
||||||
|
|
||||||
ENV NAME=ruby ARCH=x86_64
|
ENV LC_CTYPE C.UTF-8
|
||||||
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"
|
|
||||||
|
|
||||||
RUN dnf install -y --setopt=tsflags=nodocs ruby && \
|
RUN dnf -y update
|
||||||
dnf -y clean all
|
RUN dnf -y --nodocs install \
|
||||||
|
ruby \
|
||||||
# ruby will be run under standard user on Fedora
|
&& dnf -y clean all
|
||||||
USER 1000
|
|
||||||
|
|
||||||
CMD /bin/bash
|
CMD /bin/bash
|
||||||
|
@ -1,16 +1,8 @@
|
|||||||
IMAGE_NAME = ruby
|
default: test
|
||||||
|
|
||||||
MODULEMDURL=file://ruby.yaml
|
|
||||||
|
|
||||||
default: run
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
docker build --tag=$(IMAGE_NAME) .
|
docker build -t ruby .
|
||||||
|
docker run -d ruby
|
||||||
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
|
|
||||||
|
|
||||||
|
test:
|
||||||
|
$(MAKE) -C tests $@
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
MODULE_LINT=/usr/share/moduleframework/tools/modulelint.py
|
# A workflow with modularity-testing-framework is still uncertain.
|
||||||
# --filter-by-tags=-WIP: ignore WIP tag test that have a issue on F25 avocado.
|
# Only nspawn is actually used.
|
||||||
CMD=python -m avocado run --filter-by-tags=-WIP $(MODULE_LINT) *.py
|
# https://meta-test-family.readthedocs.io/en/latest/index.html
|
||||||
|
|
||||||
#
|
#
|
||||||
all:
|
# Installation
|
||||||
$(CMD)
|
# $ 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