Add tests converting dab files

This commit is contained in:
Christopher A. Baumbauer
2016-10-26 21:47:51 -07:00
parent da44a5d750
commit 1b3f71c55f
5 changed files with 542 additions and 0 deletions
@@ -0,0 +1,65 @@
{
"Services": {
"db": {
"Image": "postgres@sha256:33632bbd3222fa738d80a267b7c706a15d76eb3a59facab94bbd52a69cd1e30c",
"Labels": {
"com.example.description": "Postgres Database"
},
"Networks": [
"default"
],
"Ports": [
{
"Port": 5432,
"Protocol": "tcp"
}
]
},
"redis": {
"Image": "redis@sha256:afa4e7f6dc4d4f4294f54835bcfe610201057f5424b36310cba799e625849ebd",
"Networks": [
"default"
],
"Ports": [
{
"Port": 6379,
"Protocol": "tcp"
}
]
},
"result": {
"Image": "tmadams333/example-voting-app-result@sha256:97d6ba26e5ffa35a89a3d97627fa3c8a3b0b3df8e708129eabcf9f2755e06d13",
"Networks": [
"default"
],
"Ports": [
{
"Port": 80,
"Protocol": "tcp"
}
]
},
"vote": {
"Image": "docker/example-voting-app-vote@sha256:33f7924f9aaabd2aacf3f59a9c98e372360213ec94cb35f60842502632ec2f74",
"Labels": {
"com.example.description": "Vote"
},
"Networks": [
"default"
],
"Ports": [
{
"Port": 80,
"Protocol": "tcp"
}
]
},
"worker": {
"Image": "docker/example-voting-app-worker@sha256:62cbf0976fc66192d19412135fc422bfaaed5987a8ae405ff4d1968f1b714f24",
"Networks": [
"default"
]
}
},
"Version": "0.1"
}
+306
View File
@@ -0,0 +1,306 @@
{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "db",
"creationTimestamp": null,
"labels": {
"service": "db"
},
"annotations": {
"com.example.description": "Postgres Database"
}
},
"spec": {
"ports": [
{
"name": "5432",
"protocol": "TCP",
"port": 5432,
"targetPort": 5432
}
],
"selector": {
"service": "db"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"ports": [
{
"name": "6379",
"protocol": "TCP",
"port": 6379,
"targetPort": 6379
}
],
"selector": {
"service": "redis"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "result",
"creationTimestamp": null,
"labels": {
"service": "result"
}
},
"spec": {
"ports": [
{
"name": "80",
"protocol": "TCP",
"port": 80,
"targetPort": 80
}
],
"selector": {
"service": "result"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "vote",
"creationTimestamp": null,
"labels": {
"service": "vote"
},
"annotations": {
"com.example.description": "Vote"
}
},
"spec": {
"ports": [
{
"name": "80",
"protocol": "TCP",
"port": 80,
"targetPort": 80
}
],
"selector": {
"service": "vote"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "db",
"creationTimestamp": null,
"annotations": {
"com.example.description": "Postgres Database"
}
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "db"
}
},
"spec": {
"containers": [
{
"name": "db",
"image": "postgres",
"ports": [
{
"containerPort": 5432,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "redis",
"creationTimestamp": null
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"containers": [
{
"name": "redis",
"image": "redis",
"ports": [
{
"containerPort": 6379,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "result",
"creationTimestamp": null
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "result"
}
},
"spec": {
"containers": [
{
"name": "result",
"image": "tmadams333/example-voting-app-result",
"ports": [
{
"containerPort": 80,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "vote",
"creationTimestamp": null,
"annotations": {
"com.example.description": "Vote"
}
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "vote"
}
},
"spec": {
"containers": [
{
"name": "vote",
"image": "docker/example-voting-app-vote",
"ports": [
{
"containerPort": 80,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "worker",
"creationTimestamp": null
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "worker"
}
},
"spec": {
"containers": [
{
"name": "worker",
"image": "docker/example-voting-app-worker",
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
}
]
}