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

[☑️] - Updating testing address, and adding curl #3

Merged
merged 2 commits into from
Mar 11, 2024
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
42 changes: 40 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,50 @@ jobs:
fail-on-cache-miss: true

- name: Load Linkos
env:
ENVIRONMENT: ${{secrets.ENVIRONMENT}}
TOKEN_DRIVER: ${{secrets.TOKEN_DRIVER}}
APP_SSL_KEY: ${{secrets.APP_SSL_KEY}}
API_ENDPOINT: ${{secrets.API_ENDPOINT}}
BACKUP_CRON: ${{secrets.BACKUP_CRON}}
NANOID_LETTERS: ${{secrets.NANOID_LETTERS}}
NANOID_LENGTH: ${{secrets.NANOID_LENGTH}}
KAFKA_NUMBER_OF_PARTITIONS: ${{secrets.KAFKA_NUMBER_OF_PARTITIONS}}
MAIN_DOMAIN: ${{secrets.MAIN_DOMAIN}}
APPWRITE_ENDPOINT: ${{secrets.APPWRITE_ENDPOINT}}
APPWRITE_PROJECT_ID: ${{secrets.APPWRITE_PROJECT_ID}}
APPWRITE_API_KEY: ${{secrets.APPWRITE_API_KEY}}
REDIS_HOST: ${{secrets.REDIS_HOST}}
REDIS_PORT: ${{secrets.REDIS_PORT}}
KAFKA_HOSTS: ${{secrets.KAFKA_HOSTS}}
KAFKA_CFG_NODE_ID: ${{secrets.KAFKA_CFG_NODE_ID}}
KAFKA_CFG_PROCESS_ROLES: ${{secrets.KAFKA_CFG_PROCESS_ROLES}}
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: ${{secrets.KAFKA_CFG_CONTROLLER_QUORUM_VOTERS}}
KAFKA_CFG_LISTENERS: ${{secrets.KAFKA_CFG_LISTENERS}}
KAFKA_CFG_ADVERTISED_LISTENERS: ${{secrets.KAFKA_CFG_ADVERTISED_LISTENERS}}
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: ${{secrets.KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP}}
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: ${{secrets.KAFKA_CFG_CONTROLLER_LISTENER_NAMES}}
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: ${{secrets.KAFKA_CFG_INTER_BROKER_LISTENER_NAME}}
CLICKHOUSE_PROTOCOL: ${{secrets.CLICKHOUSE_PROTOCOL}}
CLICKHOUSE_HOST: ${{secrets.CLICKHOUSE_HOST}}
CLICKHOUSE_PORT: ${{secrets.CLICKHOUSE_PORT}}
CLICKHOUSE_DB: ${{secrets.CLICKHOUSE_DB}}
CLICKHOUSE_USER: ${{secrets.CLICKHOUSE_USER}}
CLICKHOUSE_PASSWORD: ${{secrets.CLICKHOUSE_PASSWORD}}
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: ${{secrets.CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT}}
POSTGRES_HOST: ${{secrets.POSTGRES_HOST}}
POSTGRES_PORT: ${{secrets.POSTGRES_PORT}}
POSTGRES_DB: ${{secrets.POSTGRES_DB}}
POSTGRES_USER: ${{secrets.POSTGRES_USER}}
POSTGRES_PASSWORD: ${{secrets.POSTGRES_PASSWORD}}
run: |
docker load --input /tmp/${{ env.IMAGE }}.tar
docker compose -f docker-compose.ci.yml up -d
sleep 10
sleep 20
- name: curl health
run: curl localhost/v1/api/health
- name: Install bun
uses: oven-sh/setup-bun@v1
- name: run tests
working-directory: ./e2e
run: bun test
run: bun test
4 changes: 2 additions & 2 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
depends_on:
- linkos
ports:
- "8080:80"
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
Expand Down Expand Up @@ -329,4 +329,4 @@ volumes:
redis:
postgres:
clickhouse:
kafka:
kafka:
4 changes: 2 additions & 2 deletions e2e/tests/api.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {expect, test, describe, beforeAll} from "bun:test";

const apiEndpoint = 'http://localhost:8080/v1/api'
const apiEndpoint = 'http://127.0.0.1/v1/api'

interface response {
success: boolean,
Expand Down Expand Up @@ -164,4 +164,4 @@ describe('All endpoints logged in', () => {
expect(res.status).toBe(200);
expect(json.success).toBe(true);
});
});
});
2 changes: 1 addition & 1 deletion e2e/tests/links.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {expect, test, describe, beforeAll} from "bun:test";

const endpoint = 'http://localhost:8080/'
const endpoint = 'http://127.0.0.1/'

interface response {
success: boolean,
Expand Down
Loading