Add an integration test for roles
Add an app with roles to the integration tests. We'll deploy two web containers and one worker. The worker just sleeps, so we are testing that the container has booted.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo "Docker set up!"
|
||||
mkdir -p /tmp/${TEST_ID} && touch /tmp/${TEST_ID}/docker-setup
|
||||
3
test/integration/docker/deployer/app_with_roles/.kamal/hooks/post-deploy
Executable file
3
test/integration/docker/deployer/app_with_roles/.kamal/hooks/post-deploy
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo "Deployed!"
|
||||
mkdir -p /tmp/${TEST_ID} && touch /tmp/${TEST_ID}/post-deploy
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo "Rebooted Traefik on ${KAMAL_HOSTS}"
|
||||
mkdir -p /tmp/${TEST_ID} && touch /tmp/${TEST_ID}/post-traefik-reboot
|
||||
3
test/integration/docker/deployer/app_with_roles/.kamal/hooks/pre-build
Executable file
3
test/integration/docker/deployer/app_with_roles/.kamal/hooks/pre-build
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo "About to build and push..."
|
||||
mkdir -p /tmp/${TEST_ID} && touch /tmp/${TEST_ID}/pre-build
|
||||
8
test/integration/docker/deployer/app_with_roles/.kamal/hooks/pre-connect
Executable file
8
test/integration/docker/deployer/app_with_roles/.kamal/hooks/pre-connect
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "About to lock..."
|
||||
if [ "$KAMAL_HOSTS" != "vm1,vm2,vm3" ]; then
|
||||
echo "Expected hosts to be 'vm1,vm2,vm3', got $KAMAL_HOSTS"
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p /tmp/${TEST_ID} && touch /tmp/${TEST_ID}/pre-connect
|
||||
3
test/integration/docker/deployer/app_with_roles/.kamal/hooks/pre-deploy
Executable file
3
test/integration/docker/deployer/app_with_roles/.kamal/hooks/pre-deploy
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo "Deployed!"
|
||||
mkdir -p /tmp/${TEST_ID} && touch /tmp/${TEST_ID}/pre-deploy
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo "Rebooting Traefik on ${KAMAL_HOSTS}..."
|
||||
mkdir -p /tmp/${TEST_ID} && touch /tmp/${TEST_ID}/pre-traefik-reboot
|
||||
Reference in New Issue
Block a user