Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: more e2e test coverage - backwards compatibility #250

Merged
merged 6 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
247 changes: 246 additions & 1 deletion .github/workflows/end2end_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ jobs:
run: |
docker compose down


e2e-local-trunk:
# needs: [e2e-set-up-sshrvd]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -250,5 +249,251 @@ jobs:
- name: Tear down
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/release-local
run: |
docker compose down

e2e-local-release3-2-0:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Copy keys
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
echo "${{ secrets.ATKEYS_8INCANTEATER }}" > sshnp/keys/${{ env.SSHNP_ATSIGN }}_key.atKeys
echo "${{ secrets.ATKEYS_8052SIMPLE }}" > sshnpd/keys/${{ env.SSHNPD_ATSIGN }}_key.atKeys

- name: Set up
working-directory: packages/sshnoports/test/end2end_tests/tools/configuration
run: |
./setup-sshnp-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}6 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }} ${{ env.SSHRVD_ATSIGN }}
./setup-sshnpd-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}6 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }}

- name: Ensure entrypoints exist
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
cat sshnp/entrypoint.sh
cat sshnpd/entrypoint.sh

- name: Test
working-directory: packages/sshnoports/test/end2end_tests/tests/local-release3.2.0
run: |
${{ env.DOCKER_COMPOSE_UP_CMD }}

- name: Logs
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/local-release3.2.0
run: |
docker compose ps -a
docker compose logs --timestamps

- name: Tear down
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/local-release3.2.0
run: |
docker compose down

e2e-release3-2-0-local:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Copy keys
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
echo "${{ secrets.ATKEYS_8INCANTEATER }}" > sshnp/keys/${{ env.SSHNP_ATSIGN }}_key.atKeys
echo "${{ secrets.ATKEYS_8052SIMPLE }}" > sshnpd/keys/${{ env.SSHNPD_ATSIGN }}_key.atKeys

- name: Set up
working-directory: packages/sshnoports/test/end2end_tests/tools/configuration
run: |
./setup-sshnp-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}7 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }} ${{ env.SSHRVD_ATSIGN }}
./setup-sshnpd-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}7 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }}

- name: Ensure entrypoints exist
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
cat sshnp/entrypoint.sh
cat sshnpd/entrypoint.sh

- name: Test
working-directory: packages/sshnoports/test/end2end_tests/tests/release3.2.0-local
run: |
${{ env.DOCKER_COMPOSE_UP_CMD }}

- name: Logs
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/release3.2.0-local
run: |
docker compose ps -a
docker compose logs --timestamps

- name: Tear down
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/release3.2.0-local
run: |
docker compose down

e2e-local-release3-3-0:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Copy keys
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
echo "${{ secrets.ATKEYS_8INCANTEATER }}" > sshnp/keys/${{ env.SSHNP_ATSIGN }}_key.atKeys
echo "${{ secrets.ATKEYS_8052SIMPLE }}" > sshnpd/keys/${{ env.SSHNPD_ATSIGN }}_key.atKeys

- name: Set up
working-directory: packages/sshnoports/test/end2end_tests/tools/configuration
run: |
./setup-sshnp-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}8 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }} ${{ env.SSHRVD_ATSIGN }}
./setup-sshnpd-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}8 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }}

- name: Ensure entrypoints exist
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
cat sshnp/entrypoint.sh
cat sshnpd/entrypoint.sh

- name: Test
working-directory: packages/sshnoports/test/end2end_tests/tests/local-release3.3.0
run: |
${{ env.DOCKER_COMPOSE_UP_CMD }}

- name: Logs
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/local-release3.3.0
run: |
docker compose ps -a
docker compose logs --timestamps

- name: Tear down
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/local-release3.3.0
run: |
docker compose down

e2e-release3-3-0-local:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Copy keys
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
echo "${{ secrets.ATKEYS_8INCANTEATER }}" > sshnp/keys/${{ env.SSHNP_ATSIGN }}_key.atKeys
echo "${{ secrets.ATKEYS_8052SIMPLE }}" > sshnpd/keys/${{ env.SSHNPD_ATSIGN }}_key.atKeys

- name: Set up
working-directory: packages/sshnoports/test/end2end_tests/tools/configuration
run: |
./setup-sshnp-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}9 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }} ${{ env.SSHRVD_ATSIGN }}
./setup-sshnpd-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}9 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }}

- name: Ensure entrypoints exist
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
cat sshnp/entrypoint.sh
cat sshnpd/entrypoint.sh

- name: Test
working-directory: packages/sshnoports/test/end2end_tests/tests/release3.3.0-local
run: |
${{ env.DOCKER_COMPOSE_UP_CMD }}

- name: Logs
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/release3.3.0-local
run: |
docker compose ps -a
docker compose logs --timestamps

- name: Tear down
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/release3.3.0-local
run: |
docker compose down

e2e-release3-1-2-local:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Copy keys
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
echo "${{ secrets.ATKEYS_8INCANTEATER }}" > sshnp/keys/${{ env.SSHNP_ATSIGN }}_key.atKeys
echo "${{ secrets.ATKEYS_8052SIMPLE }}" > sshnpd/keys/${{ env.SSHNPD_ATSIGN }}_key.atKeys

- name: Set up
working-directory: packages/sshnoports/test/end2end_tests/tools/configuration
run: |
./setup-sshnp-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}10 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }} ${{ env.SSHRVD_ATSIGN }}
./setup-sshnpd-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}10 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }}

- name: Ensure entrypoints exist
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
cat sshnp/entrypoint.sh
cat sshnpd/entrypoint.sh

- name: Test
working-directory: packages/sshnoports/test/end2end_tests/tests/release3.1.2-local
run: |
${{ env.DOCKER_COMPOSE_UP_CMD }}

- name: Logs
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/release3.1.2-local
run: |
docker compose ps -a
docker compose logs --timestamps

- name: Tear down
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/release3.1.2-local
run: |
docker compose down

e2e-local-release3-1-2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Copy keys
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
echo "${{ secrets.ATKEYS_8INCANTEATER }}" > sshnp/keys/${{ env.SSHNP_ATSIGN }}_key.atKeys
echo "${{ secrets.ATKEYS_8052SIMPLE }}" > sshnpd/keys/${{ env.SSHNPD_ATSIGN }}_key.atKeys

- name: Set up
working-directory: packages/sshnoports/test/end2end_tests/tools/configuration
run: |
./setup-sshnp-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}11 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }} ${{ env.SSHRVD_ATSIGN }}
./setup-sshnpd-entrypoint.sh ${{ github.run_id }}${{ github.run_attempt }}11 ${{ env.SSHNP_ATSIGN }} ${{ env.SSHNPD_ATSIGN }}

- name: Ensure entrypoints exist
working-directory: packages/sshnoports/test/end2end_tests/contexts
run: |
cat sshnp/entrypoint.sh
cat sshnpd/entrypoint.sh

- name: Test
working-directory: packages/sshnoports/test/end2end_tests/tests/local-release3.1.2
run: |
${{ env.DOCKER_COMPOSE_UP_CMD }}

- name: Logs
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/local-release3.1.2
run: |
docker compose ps -a
docker compose logs --timestamps

- name: Tear down
if: always()
working-directory: packages/sshnoports/test/end2end_tests/tests/local-release3.1.2
run: |
docker compose down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
sleep 2 # time for sshnpd to share device name
sleep 30 # time for sshnpd to share device name
SSHNP_COMMAND="~/.local/bin/sshnp -f @sshnpatsign -t @sshnpdatsign -d deviceName -h @sshrvdatsign -s id_ed25519.pub -v > logs.txt"
echo "Running: $SSHNP_COMMAND"
eval $SSHNP_COMMAND
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
version: '3'

services:
image-runtime-local:
build:
context: ../../../../
dockerfile: test/end2end_tests/image/Dockerfile
target: runtime-local
image: atsigncompany/sshnp-e2e-runtime:local
deploy:
mode: replicated
replicas: 0
image-runtime-release:
build:
context: ../../image/
dockerfile: ./Dockerfile
target: runtime-release
args:
- release=3.1.2
image: atsigncompany/sshnp-e2e-runtime:release3.1.2
deploy:
mode: replicated
replicas: 0
container-sshnp:
image: atsigncompany/sshnp-e2e-runtime:local
container_name: sshnp
volumes:
- ../../contexts/sshnp/keys/:/atsign/.atsign/keys/ # mount keys
- ../../contexts/sshnp/entrypoint.sh:/atsign/entrypoint.sh # mount entrypoint
networks:
- sshnp
depends_on:
- image-runtime-local
- container-sshnpd
container-sshnpd:
image: atsigncompany/sshnp-e2e-runtime:release3.1.2
container_name: sshnpd
volumes:
- ../../contexts/sshnpd/keys/:/atsign/.atsign/keys/ # mount keys
- ../../contexts/sshnpd/entrypoint.sh:/atsign/entrypoint.sh # mount entrypoint.sh
- ../../contexts/sshnpd/test.sh:/atsign/test.sh # mount test.sh
networks:
- sshnpd
depends_on:
- image-runtime-release

networks:
sshnp:
driver: bridge
name: atsigncompany/sshnp-e2e-network-sshnp
sshnpd:
driver: bridge
name: atsigncompany/sshnp-e2e-network-sshnpd

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
version: '3'

services:
image-runtime-local:
build:
context: ../../../../
dockerfile: test/end2end_tests/image/Dockerfile
target: runtime-local
image: atsigncompany/sshnp-e2e-runtime:local
deploy:
mode: replicated
replicas: 0
image-runtime-release:
build:
context: ../../image/
dockerfile: ./Dockerfile
target: runtime-release
args:
- release=3.2.0
image: atsigncompany/sshnp-e2e-runtime:release3.2.0
deploy:
mode: replicated
replicas: 0
container-sshnp:
image: atsigncompany/sshnp-e2e-runtime:local
container_name: sshnp
volumes:
- ../../contexts/sshnp/keys/:/atsign/.atsign/keys/ # mount keys
- ../../contexts/sshnp/entrypoint.sh:/atsign/entrypoint.sh # mount entrypoint
networks:
- sshnp
depends_on:
- image-runtime-local
- container-sshnpd
container-sshnpd:
image: atsigncompany/sshnp-e2e-runtime:release3.2.0
container_name: sshnpd
volumes:
- ../../contexts/sshnpd/keys/:/atsign/.atsign/keys/ # mount keys
- ../../contexts/sshnpd/entrypoint.sh:/atsign/entrypoint.sh # mount entrypoint.sh
- ../../contexts/sshnpd/test.sh:/atsign/test.sh # mount test.sh
networks:
- sshnpd
depends_on:
- image-runtime-release

networks:
sshnp:
driver: bridge
name: atsigncompany/sshnp-e2e-network-sshnp
sshnpd:
driver: bridge
name: atsigncompany/sshnp-e2e-network-sshnpd

Loading