Skip to content

Instantly share code, notes, and snippets.

View rwngwn's full-sized avatar
🏠
Working from home

David Becvarik rwngwn

🏠
Working from home
View GitHub Profile
Feature: eap6-basic-sti template tests
Scenario: check that template can be processed
When eap6-basic-sti-project is created
Then ../eap/eap6-basic-sti.json is processed with parameters
| parameter | value |
| APPLICATION_NAME | helloworld |
| APPLICATION_HOSTNAME | helloworld.yourproject.local |
| GIT_URI | https://github.com/jboss-developer/jboss-eap-quickstarts |
| GIT_REF | 6.4.x |
ctf-cli.py run --behave-tahs bb,cc --behave-tags aa --behave-data IMAGE=aaa
usage: ctf-cli.py [-h] [-v] {remote,init,run,update} ...
ctf-cli.py: error: unrecognized arguments: --behave-tahs bb,cc
[dbecvari@bazaar ctf]$ ctf-cli.py run --behave-tags bb,cc --behave-tags aa --behave-data IMAGE=aaa
INFO: Running Containers Testing Framework cli
INFO: Using project specific Features from 'tests/features'
INFO: Using project specific Steps from 'tests/steps'
WARNING: Not using project specific environment.py. '/home/dbecvari/tmp/ctf/tests/environment.py' does not exist!
INFO: Running behave inside working directory 'behave -D IMAGE=aaa -t bb,cc -t aa -D ANSIBLE=/home/dbecvari/tmp/ctf/workdir/ansible.conf'
[ctf]
ExecType=ansible
[ansible]
Host=192.168.1.1
Method=local
User=root
function generate_tx_datasource() {
ds=" <datasource jta=\"false\" jndi-name=\"${2}ObjectStore\" pool-name=\"${1}ObjectStorePool\" enabled=\"true\">
<connection-url>jdbc:${8}://${5}:${6}/${7}</connection-url>
<driver>${8}</driver>"
if [ -n "$tx_isolation" ]; then
ds="$ds
<transaction-isolation>$tx_isolation</transaction-isolation>"
fi
if [ -n "$min_pool_size" ] || [ -n "$max_pool_size" ]; then
if (outcome != sucess) of /subsystem=datasources/xa-data-source=test_mysql:read-resource
xa-data-source add --name=test_mysql --jndi-name=java:jboss/datasources/test_mysql --driver-name=mysql --user-name=marek --password=hardtoguess
/subsystem=datasources/xa-data-source=test_mysql/xa-datasource-properties=ServerName:add(value=10.1.1.1)
/subsystem=datasources/xa-data-source=test_mysql/xa-datasource-properties=Port:add(value=3306)
/subsystem=datasources/xa-data-source=test_mysql/xa-datasource-properties=DatabaseName:add(value=kitchensink)
end-if
FROM jboss/wildfly
USER root
# Install packages necessary to run EAP
RUN yum -y install python python-devel python-setuptools git gcc libxml2-devel libxslt-devel && yum clean all
# Install cct
RUN git clone https://github.com/containers-tools/cct && \
cd cct && \
easy_install .
FROM jboss/wildfly
USER root
# Install packages necessary to run EAP
RUN yum -y install python PyYAML python-setuptools git && yum clean all
# Install cct
RUN git clone https://github.com/containers-tools/cct && \
cd cct && \
easy_install .
@rwngwn
rwngwn / faker.c
Last active September 28, 2015 12:51
#define _GNU_SOURCE
#include <dlfcn.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>

in behave you can specfy tags like:

--tags foo,bar --tags baz

I will call --tags foo,bar as a tag set what behave does is that it:

takes tag one by on in each set and if any of tag is in (is not for ~ negtion) tags for feature/scenatio its considers set to pass

if all set passes test is executed

./generate.sh ../standalone/base-jdk/8/image.yaml ../standalone/base-jdk/8/
Using '1.0.0' version of the generator tool
Using '/home/dbecvari/jboss-dockerfiles/standalone/base-jdk/8/image.yaml' template
Using '/home/dbecvari/jboss-dockerfiles/standalone/base-jdk/8' as the output directory
Using '/home/dbecvari/jboss-dockerfiles/scripts' as the scripts directory
Unable to find image 'ce-registry.usersys.redhat.com/jboss/dogen:1.0.0' locally
Trying to pull repository ce-registry.usersys.redhat.com/jboss/dogen ...
cbe5d35693e9: Download complete
47d44cb6f252: Download complete
f6f39725d938: Download complete