Skip to content

Commit

Permalink
Moved fixtures from script/test to script/test/cmd
Browse files Browse the repository at this point in the history
moved fixtures from script/test to script/test/cmd because according to the go best pactices fixtures should be in the same directory where the test files are
  • Loading branch information
procrypt committed Jun 12, 2017
1 parent 036008b commit f06c414
Show file tree
Hide file tree
Showing 90 changed files with 263 additions and 263 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test-openshift:
# run commandline tests
.PHONY: test-cmd
test-cmd:
./script/test/cmd/tests.sh
go test -v github.com/kubernetes-incubator/kompose/script/test/cmd/

# run all validation tests
.PHONY: validate
Expand Down Expand Up @@ -99,6 +99,7 @@ test-dep:
go get github.com/Masterminds/glide
go get github.com/sgotti/glide-vc
go get github.com/golang/lint/golint
go get github.com/joho/godotenv

# build docker image that is used for running all test localy
.PHONY: test-image
Expand Down
2 changes: 1 addition & 1 deletion script/test/cmd/fixtures/buildargs/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
build:
context: "./build"
args:
NAME: web
- NAME=web
command: "sleep 3600"
foo1:
build:
Expand Down
72 changes: 36 additions & 36 deletions script/test/cmd/fixtures/buildargs/output-os-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "foo1",
"name": "foo",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "foo1"
"io.kompose.service": "foo"
}
},
"spec": {
Expand All @@ -22,7 +22,7 @@
}
],
"selector": {
"io.kompose.service": "foo1"
"io.kompose.service": "foo"
},
"clusterIP": "None"
},
Expand All @@ -34,10 +34,10 @@
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "foo",
"name": "foo1",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "foo"
"io.kompose.service": "foo1"
}
},
"spec": {
Expand All @@ -49,7 +49,7 @@
}
],
"selector": {
"io.kompose.service": "foo"
"io.kompose.service": "foo1"
},
"clusterIP": "None"
},
Expand All @@ -61,10 +61,10 @@
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "foo1",
"name": "foo",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "foo1"
"io.kompose.service": "foo"
}
},
"spec": {
Expand All @@ -80,31 +80,31 @@
"imageChangeParams": {
"automatic": true,
"containerNames": [
"foo1"
"foo"
],
"from": {
"kind": "ImageStreamTag",
"name": "foo1:latest"
"name": "foo:latest"
}
}
}
],
"replicas": 1,
"test": false,
"selector": {
"io.kompose.service": "foo1"
"io.kompose.service": "foo"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "foo1"
"io.kompose.service": "foo"
}
},
"spec": {
"containers": [
{
"name": "foo1",
"name": "foo",
"image": " ",
"args": [
"sleep",
Expand All @@ -123,10 +123,10 @@
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "foo1",
"name": "foo",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "foo1"
"io.kompose.service": "foo"
}
},
"spec": {},
Expand All @@ -138,10 +138,10 @@
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "foo1",
"name": "foo",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "foo1"
"io.kompose.service": "foo"
}
},
"spec": {
Expand All @@ -160,7 +160,7 @@
"uri": "%URI%",
"ref": "%REF%"
},
"contextDir": "script/test/fixtures/buildargs/build/"
"contextDir": "script/test/cmd/fixtures/buildargs/build/"
},
"strategy": {
"type": "Docker",
Expand All @@ -169,18 +169,14 @@
{
"name": "NAME",
"value": "web"
},
{
"name": "foo",
"value": "bar"
}
]
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "foo1:latest"
"name": "foo:latest"
}
},
"resources": {},
Expand All @@ -195,10 +191,10 @@
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "foo",
"name": "foo1",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "foo"
"io.kompose.service": "foo1"
}
},
"spec": {
Expand All @@ -214,31 +210,31 @@
"imageChangeParams": {
"automatic": true,
"containerNames": [
"foo"
"foo1"
],
"from": {
"kind": "ImageStreamTag",
"name": "foo:latest"
"name": "foo1:latest"
}
}
}
],
"replicas": 1,
"test": false,
"selector": {
"io.kompose.service": "foo"
"io.kompose.service": "foo1"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "foo"
"io.kompose.service": "foo1"
}
},
"spec": {
"containers": [
{
"name": "foo",
"name": "foo1",
"image": " ",
"args": [
"sleep",
Expand All @@ -257,10 +253,10 @@
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "foo",
"name": "foo1",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "foo"
"io.kompose.service": "foo1"
}
},
"spec": {},
Expand All @@ -272,10 +268,10 @@
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "foo",
"name": "foo1",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "foo"
"io.kompose.service": "foo1"
}
},
"spec": {
Expand All @@ -294,7 +290,7 @@
"uri": "%URI%",
"ref": "%REF%"
},
"contextDir": "script/test/fixtures/buildargs/build/"
"contextDir": "script/test/cmd/fixtures/buildargs/build/"
},
"strategy": {
"type": "Docker",
Expand All @@ -303,14 +299,18 @@
{
"name": "NAME",
"value": "web"
},
{
"name": "foo",
"value": "bar"
}
]
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "foo:latest"
"name": "foo1:latest"
}
},
"resources": {},
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ services:
ports:
- "$DB_PORT"
environment:
MYSQL_ROOT_PASSWORD: $ROOT_PASS
MYSQL_DATABASE: $DB_NAME
MYSQL_PASSWORD: $DB_PASS
MYSQL_USER: $DB_USER
- MYSQL_ROOT_PASSWORD=$ROOT_PASS
- MYSQL_DATABASE=$DB_NAME
- MYSQL_PASSWORD=$DB_PASS
- MYSQL_USER=$DB_USER
volumes:
- /var/lib/mysql

Expand All @@ -20,8 +20,8 @@ services:
depends_on:
- mariadb
environment:
DB_HOST: $DB_HOST
DB_DBID: $DB_NAME
DB_PASS: $DB_PASS
DB_PORT: $DB_PORT
DB_USER: $DB_USER
- DB_HOST=$DB_HOST
- DB_DBID=$DB_NAME
- DB_PASS=$DB_PASS
- DB_PORT=$DB_PORT
- DB_USER=$DB_USER
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,24 @@
],
"env": [
{
"name": "DB_USER",
"value": "etherpad"
"name": "DB_HOST",
"value": "mariadb"
},
{
"name": "DB_DBID",
"value": "etherpad"
},
{
"name": "DB_HOST",
"value": "mariadb"
},
{
"name": "DB_PASS",
"value": "etherpad"
},
{
"name": "DB_PORT",
"value": "3306"
},
{
"name": "DB_USER",
"value": "etherpad"
}
],
"resources": {}
Expand Down Expand Up @@ -155,15 +155,15 @@
],
"env": [
{
"name": "MYSQL_DATABASE",
"name": "MYSQL_ROOT_PASSWORD",
"value": "etherpad"
},
{
"name": "MYSQL_PASSWORD",
"name": "MYSQL_DATABASE",
"value": "etherpad"
},
{
"name": "MYSQL_ROOT_PASSWORD",
"name": "MYSQL_PASSWORD",
"value": "etherpad"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@
}
],
"env": [
{
"name": "DB_DBID",
"value": "etherpad"
},
{
"name": "DB_HOST",
"value": "mariadb"
},
{
"name": "DB_DBID",
"value": "etherpad"
},
{
"name": "DB_PASS",
"value": "etherpad"
Expand Down Expand Up @@ -233,15 +233,15 @@
],
"env": [
{
"name": "MYSQL_DATABASE",
"name": "MYSQL_ROOT_PASSWORD",
"value": "etherpad"
},
{
"name": "MYSQL_PASSWORD",
"name": "MYSQL_DATABASE",
"value": "etherpad"
},
{
"name": "MYSQL_ROOT_PASSWORD",
"name": "MYSQL_PASSWORD",
"value": "etherpad"
},
{
Expand Down
File renamed without changes.
Loading

0 comments on commit f06c414

Please sign in to comment.