-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Creates Test Plan for Running Integration Tests on Server API Endpoints #1493
Changes from all commits
6c8bd33
9a38856
a2c8ee7
66f1dc6
5b8efa6
34538d8
a9ef7b4
9f5e596
e0ff2a8
1a3fd93
d0dc0b7
4435b4f
7922153
2cbd941
57d551f
60b6425
07abca5
f74e5bf
0b02b6b
347f539
fb3fcc2
f751ff3
d4b9bef
2a82ee5
e14cf90
3407be0
9febb94
d45e2e4
d315c4e
0b39c02
0425165
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: tdm-server-test | ||
run-name: ${{ github.actor }} is running tests for the server | ||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Change directory | ||
run: cd server | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
working-directory: server | ||
|
||
- name: Set up environment variables | ||
run: | | ||
echo "TEST_ENV=true" >> .env | ||
echo "PORT=5002" >> .env | ||
echo "NODE_OPTIONS=--trace-deprecation" >> .env | ||
echo "JWT_SECRET_KEY=testingSecretKey" >> .env | ||
echo "CLIENT_URL=http://localhost:3001" >> .env | ||
echo "SERVER_URL=http://localhost:5002" >> .env | ||
echo "SENDGRID_API_KEY=SG.testAPIkey" >> .env | ||
echo "[email protected]" >> .env | ||
echo "EMAIL_PUBLIC_COMMENT_LA_CITY=tdm+devpubliccommentplanning@test.org" >> .env | ||
echo "[email protected]" >> .env | ||
echo "APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/" >> .env | ||
echo "[email protected]" >> .env | ||
echo "SECURITY_ADMIN_PASSWORD=Dogfood1!" >> .env | ||
echo "SQL_SERVER_NAME=localhost" >> .env | ||
echo "SQL_SERVER_PORT=1434" >> .env | ||
echo "SQL_DATABASE_NAME=tdmtestdb" >> .env | ||
echo "SQL_USER_NAME=sa" >> .env | ||
echo "SQL_PASSWORD=TestPassw0rd" >> .env | ||
echo "SQL_ENCRYPT=false" >> .env | ||
working-directory: server | ||
|
||
- name: Run tests | ||
run: npm test | ||
working-directory: server |
This file was deleted.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. renamed file |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Instructions: Create a .env file in the server directory. Copy and paste values from Google Docs. | ||
|
||
# Node server settings | ||
PORT= | ||
NODE_OPTIONS= | ||
|
||
JWT_SECRET_KEY= | ||
|
||
# To support email interaction | ||
SENDGRID_API_KEY= | ||
EMAIL_PUBLIC_COMMENT_LA_CITY= | ||
EMAIL_PUBLIC_COMMENT_WEB_TEAM= | ||
|
||
# These env settings are specific to running the web api server and app on localhost. | ||
CLIENT_URL= | ||
SERVER_URL= | ||
|
||
# User Test Accounts for Shared AWS Development Environment | ||
#(Used by ThunderClient for API Endpoint testing) | ||
USERTEST_EMAIL= | ||
USERTEST_PASSWORD= | ||
ROLESTEST_EMAIL= | ||
ROLESTEST_PASSWORD= | ||
ADMINTEST_EMAIL= | ||
ADMINTEST_PASSWORD= | ||
|
||
# Shared Development Database - Azure | ||
SQL_SERVER_NAME= | ||
SQL_SERVER_PORT= | ||
SQL_DATABASE_NAME= | ||
SQL_USER_NAME= | ||
SQL_PASSWORD= | ||
SQL_ENCRYPT= | ||
SQL_TRUST_SERVER_CERTIFICATE= | ||
EMAIL_SENDER= | ||
APPLICATIONINSIGHTS_CONNECTION_STRING= | ||
|
||
######################################### | ||
## Local Development Database Settings ## | ||
######################################### | ||
|
||
## Local Development Database - Windows Native | ||
# SQL_SERVER_NAME= | ||
# SQL_SERVER_INSTANCE= | ||
# SQL_SERVER_PORT= | ||
# SQL_DATABASE_NAME= | ||
# SQL_USER_NAME= | ||
# SQL_PASSWORD= | ||
# SQL_ENCRYPT= | ||
# SQL_TRUST_SERVER_CERTIFICATE= | ||
# EMAIL_SENDER= | ||
# APPLICATIONINSIGHTS_CONNECTION_STRING= | ||
|
||
## Local Development Database - Docker Container | ||
## Example for SQL Server Express on Docker | ||
# SQL_SERVER_NAME= | ||
# SQL_SERVER_INSTANCE= | ||
# SQL_SERVER_PORT= | ||
# SQL_DATABASE_NAME= | ||
# SQL_USER_NAME= | ||
# SQL_PASSWORD= | ||
# SQL_ENCRYPT= | ||
# SQL_TRUST_SERVER_CERTIFICATE= | ||
# EMAIL_SENDER= | ||
# APPLICATIONINSIGHTS_CONNECTION_STRING= | ||
|
||
############################################################### | ||
## Testing (Comment out ALL the above variables) ## | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. renamed file with better naming convention and updated the .env file layout so that users can test locally by simply commenting out the development variables and un-commenting the testing variables. I will have to add an updated .env file to the google drive upon accepted changes |
||
############################################################### | ||
# TEST_ENV= | ||
|
||
# PORT= | ||
# NODE_OPTIONS= | ||
|
||
# JWT_SECRET_KEY= | ||
|
||
# CLIENT_URL= | ||
# SERVER_URL= | ||
|
||
# SENDGRID_API_KEY= | ||
# EMAIL_SENDER= | ||
# EMAIL_PUBLIC_COMMENT_LA_CITY= | ||
# EMAIL_PUBLIC_COMMENT_WEB_TEAM= | ||
|
||
# APPLICATIONINSIGHTS_CONNECTION_STRING= | ||
|
||
## Server Test Accounts | ||
# SECURITY_ADMIN_EMAIL= | ||
# SECURITY_ADMIN_PASSWORD= | ||
|
||
## testingcontainer Environment Variables | ||
# SQL_SERVER_NAME= | ||
# SQL_SERVER_PORT= | ||
# SQL_DATABASE_NAME= | ||
# SQL_USER_NAME= | ||
# SQL_PASSWORD= | ||
# SQL_ENCRYPT = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OBSOLETE - This was a script to test using Hoppscotch