Kompose will read input from stdin

Resolves issue #870

for example,

```
$ cat docker-compose.yaml | kompose convert -f -
INFO Kubernetes file "frontend-service.yaml" created
INFO Kubernetes file "redis-master-service.yaml" created
INFO Kubernetes file "redis-slave-service.yaml" created
INFO Kubernetes file "frontend-deployment.yaml" created
INFO Kubernetes file "redis-master-deployment.yaml" created
INFO Kubernetes file "redis-slave-deployment.yaml" created
```

Added integration test for the same.
`
This commit is contained in:
Suraj Narwade
2018-03-07 12:49:21 +05:30
parent 908e3f1b59
commit 6d4c8f9b78
8 changed files with 144 additions and 9 deletions
+5 -5
View File
@@ -44,16 +44,16 @@ clean:
.PHONY: test-unit
test-unit:
go test $(BUILD_FLAGS) -race -cover -v $(PKGS)
go test -short $(BUILD_FLAGS) -race -cover -v $(PKGS)
# Run unit tests and collect coverage
.PHONY: test-unit-cover
test-unit-cover:
# First install packages that are dependencies of the test.
go test -i -race -cover $(PKGS)
# go test doesn't support collecting coverage across multiple packages,
go test -short -i -race -cover $(PKGS)
# go test doesn't support colleting coverage across multiple packages,
# generate go test commands using go list and run go test for every package separately
go list -f '"go test -race -cover -v -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"' github.com/kubernetes/kompose/... | grep -v "vendor" | xargs -L 1 -P4 sh -c
go list -f '"go test -short -race -cover -v -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"' github.com/kubernetes/kompose/... | grep -v "vendor" | xargs -L 1 -P4 sh -c
# run openshift up/down tests
@@ -94,7 +94,7 @@ check-vendor:
# Run all tests
.PHONY: test
test: test-dep check-vendor validate test-unit-cover install test-cmd
test: bin test-dep check-vendor validate test-unit-cover install test-cmd
# Install all the required test-dependencies before executing tests (only valid when running `make test`)
.PHONY: test-dep