Skip to content
Permalink
Browse files

[tests] Update werf project name for each test

* should be uniq and has prefix `werf-test-`
  • Loading branch information
alexey-igrychev committed Oct 1, 2019
1 parent 2c2d832 commit 3b7e4276ff04fb43a0cc08a577b794b7089c0ea7
@@ -1,4 +1,4 @@
project: hotel-booking
project: werf-test-hotel-booking-artifacts
configVersion: 1
---

@@ -1,4 +1,4 @@
project: symfony-demo-ansible
project: werf-test-symfony-demo-ansible
configVersion: 1
---
image: ~
@@ -1,4 +1,4 @@
project: symfony-demo-shell
project: werf-test-symfony-demo-shell
configVersion: 1
---
image: ~

This file was deleted.

@@ -1,5 +1,4 @@
load ../../../../helpers/common
load first_application

setup() {
werf_home_init
@@ -16,6 +15,29 @@ teardown() {
werf_home_deinit
}

test_case_run() {
werf build --stages-storage :local

container_name=$1
container_host_port=$(get_unused_port)
werf run \
--stages-storage :local \
--docker-options="--rm -d -p $container_host_port:8000 --name $container_name" -- /app/start.sh

wait_till_host_ready_to_respond localhost:$container_host_port
run curl localhost:$container_host_port
[ "$status" -eq 0 ]
[[ "$output" =~ "Symfony Demo application" ]]

registry_repository_name=$container_name
werf publish \
--stages-storage :local \
--images-repo $WERF_TEST_DOCKER_REGISTRY/$registry_repository_name \
--tag-custom v0.1.0

docker stop $container_name
}

@test "first application with ansible" {
git clone https://github.com/symfony/symfony-demo.git .
cp -r $BATS_TEST_DIRNAME/data/ansible/* .
@@ -1,4 +1,4 @@
project: hotel-booking-mounts
project: werf-test-hotel-booking-mounts
configVersion: 1
---

@@ -1,4 +1,4 @@
project: atsea-shop
project: werf-test-atsea-shop
configVersion: 1
---

@@ -1,4 +1,4 @@
project: myapp
project: werf-test-deploy-into-kubernetes
configVersion: 1
---
image: ~
@@ -1,4 +1,4 @@
project: getting-started
project: werf-test-getting-started
configVersion: 1
---
image: ~

0 comments on commit 3b7e427

Please sign in to comment.
You can’t perform that action at this time.