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

Feature/#209 update klarna consumer token every request to post transactions #213

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
e5d7348
Moved klarna-repository to payment-methods folder, and changed databa…
sifudiep Sep 24, 2022
f09e53f
Refactored the db.js file to fit the new database structure.
midcoreboot Sep 24, 2022
883aca7
Merge branch 'refactoring-database-structure' of https://github.com/k…
midcoreboot Sep 24, 2022
a839320
Added new repositories, with TODOs for new database calls
sifudiep Sep 24, 2022
40dd6ef
Implemented TODO functions in new-transactions-repository.js
sifudiep Sep 24, 2022
99e3903
Implemented TODO functions in new-charge-sessions-repository
sifudiep Sep 24, 2022
b963581
updated the database version to 14.5
SirSitsena Sep 25, 2022
6f3c559
added the "ElectricityTariff" table and created test data for it
SirSitsena Sep 25, 2022
7da35d2
Added BLL for chargers and charge-sessions.
sifudiep Sep 26, 2022
6ea81b5
Merge branch 'refactoring-database-structure' of http://github.com/kn…
sifudiep Sep 26, 2022
4810206
Added BLL for Transactions and Reservations.
sifudiep Sep 26, 2022
1194374
Added BLL charge points.
sifudiep Sep 26, 2022
dd227f4
Added Unit tests to Charge Sessions BLL
sifudiep Sep 27, 2022
b71cc40
Added Unit Tests for Chargers BLL
sifudiep Sep 27, 2022
a0b2d3a
Added Unit Tests for Charge Points BLL
sifudiep Sep 27, 2022
c286ce9
Created repo and interface for the tariffs.
midcoreboot Sep 27, 2022
4667914
Merge branch 'refactoring-database-structure' of https://github.com/k…
midcoreboot Sep 27, 2022
96c421f
Fixed the charge point table according to our planning,
midcoreboot Sep 27, 2022
351f49a
Refactored charge-points-test.js to correct newChargePoints properties.
sifudiep Sep 28, 2022
a208607
Started fixing the validation to fit the new structure.
midcoreboot Sep 28, 2022
303d450
Fixed validation for new interfaces, the new validation is prefaced b…
midcoreboot Sep 28, 2022
24748ef
Fixed some wrong namings,
midcoreboot Sep 28, 2022
2c4a75f
Added unit tests for electricity tariff BLL.
sifudiep Sep 28, 2022
997d7b3
Merge branch 'refactoring-database-structure' of http://github.com/kn…
sifudiep Sep 28, 2022
33f735f
Added Reservations BLL unit tests.
sifudiep Sep 28, 2022
9517073
Peer review of code created by Mikael.
midcoreboot Sep 29, 2022
5950773
Peer review of Validation code written by Rasmus.
sifudiep Sep 29, 2022
ab5b83f
Merge branch 'refactoring-database-structure' of http://github.com/kn…
sifudiep Sep 29, 2022
f79d1de
the .env thingy
SirSitsena Sep 29, 2022
5b80c0d
Merge branch 'main' into refactoring-database-structure
midcoreboot Oct 1, 2022
8c24995
Removed finished TODO tasks
sifudiep Oct 3, 2022
2081935
Added updateMeterStart to new-charge-sessions
sifudiep Oct 3, 2022
1d22155
Small fixes that caused the backend to crash..
midcoreboot Oct 3, 2022
e64516e
Added KlarnaPayments table to Database model.
sifudiep Oct 3, 2022
f6b9fc1
Merge branch 'refactoring-database-structure' of http://github.com/kn…
sifudiep Oct 3, 2022
fb1d230
Started implementing new flow of backend.
sifudiep Oct 4, 2022
b6f0678
Working version of the flow between starting a charge session and cal…
midcoreboot Oct 4, 2022
ed3fef3
ChargeSession now hold responsibility over OCPP remote start & stop, …
sifudiep Oct 5, 2022
f6fa0ef
Currently, the max supported PostgreSQL version in RDS is 14.4-R1
SirSitsena Oct 6, 2022
f7b63ff
Start of new dummy data, still no charge sessions or reservations.
midcoreboot Oct 7, 2022
405f64e
Merge branch 'refactoring-database-structure' of https://github.com/k…
midcoreboot Oct 7, 2022
29fdf98
Merge branch 'main' into refactoring-database-structure
midcoreboot Oct 7, 2022
bf12d56
Merge branch 'main' into refactoring-database-structure
midcoreboot Oct 7, 2022
ce249a6
Removed database injection from BLL to DAL, also added testContainer …
sifudiep Oct 7, 2022
f5d45ab
Added more structure to testContainer.js
sifudiep Oct 7, 2022
7f3b434
Mocked all repositories, except Klarna HTTP call repository.
sifudiep Oct 7, 2022
8c3908c
Added unit tests for all interfaces, except invoices
sifudiep Oct 8, 2022
3f72d0f
Database Documentation
SirSitsena Oct 10, 2022
4c39a78
Update README.md
SirSitsena Oct 10, 2022
fca6b43
Removed mock-sequelize package and updated klarnaPayments -> newKlarn…
sifudiep Oct 11, 2022
46019e9
Merge branch 'refactoring-database-structure' of https://github.com/k…
sifudiep Oct 11, 2022
da19308
Moved generateElectricityTariffs to BLL from DAL.
sifudiep Oct 11, 2022
e5297bb
Updated READ.md file for interfaces.
sifudiep Oct 11, 2022
d883ea5
Updated README.md for tests.
sifudiep Oct 11, 2022
bc1b6ea
Removed comments, and updated README.md for payment-methods.
sifudiep Oct 12, 2022
4520229
Fixed typos of payment-methods README.
sifudiep Oct 12, 2022
c3a7caf
Added remaining necessary validations marked with TODO.
sifudiep Oct 12, 2022
82098dc
Indent fix
midcoreboot Oct 13, 2022
bf39206
Merge branch 'main' into refactoring-database-structure
midcoreboot Oct 13, 2022
6f659f7
Database Documentation update
SirSitsena Oct 13, 2022
b300ec1
small change
SirSitsena Oct 13, 2022
47bdda6
updated the backup link
SirSitsena Oct 13, 2022
d899d8c
+ technical debt to README.md
SirSitsena Oct 20, 2022
601f9d6
+ updated the password for the remote db
SirSitsena Oct 20, 2022
498c0ab
+ updated the main db README.md
SirSitsena Oct 20, 2022
7d2dd71
fixed merge error
AaronWheezer Sep 13, 2023
8891312
testing localy with the newdatabase by removing old refrences in the …
AaronWheezer Sep 26, 2023
24bf38e
Added mock-data for Mobile teams to test. Connected to Issue #205. Up…
SweOlle Sep 26, 2023
06aa037
Renamed variable names to be consistent in the routers.
SweOlle Sep 26, 2023
91b97b3
Update Swagger documentation for Transactions
loan21xw Sep 26, 2023
a7e4211
Fix GET /transactions/start/{transactionID} sending wrong data
loan21xw Sep 26, 2023
db4a37c
removed the old database out of the db.js file, now it won't create t…
AaronWheezer Sep 27, 2023
20c9fa7
fixed error for duplication creation of the database in db.js
AaronWheezer Sep 27, 2023
89e3b36
refactoring database table names
AaronWheezer Sep 27, 2023
a70518f
pushing after update db.js file ,
AaronWheezer Sep 27, 2023
c0ed35d
Merge pull request #206 from AlexTelon/feature/#205-add-mock-data-for…
loan21xw Sep 27, 2023
5915eb9
Corrected some typos in the new database and adjusted affected files …
Axel-RD Sep 27, 2023
ba1eb77
Removed endpoint /transactions/session because it is not used anymore…
SweOlle Sep 28, 2023
0d58333
Removed documentation for /transactions/session as it is now deleted.…
SweOlle Sep 28, 2023
782f068
Added function to update klarna_consumer_token for mock-data. Update …
SweOlle Oct 2, 2023
46872cf
Fixed merge conflicts.
SweOlle Oct 2, 2023
5090235
Klarna payements refactor db.js
Dwergaap Oct 2, 2023
51f1ba4
Added function to update klarna_consumer_token for mock-data. Update …
SweOlle Oct 2, 2023
521c6a2
Merge branch 'feature/#209-Update-klarna-consumer-token-every-request…
SweOlle Oct 3, 2023
f26c761
Added commit that was not added through merge.
loan21xw Sep 28, 2023
583e8e5
Removed/updated comments in db.js
Axel-RD Oct 3, 2023
932eb6f
removed new prefix from filenames for repositories, interfaces and va…
Axel-RD Oct 3, 2023
a14ed0b
merge with dev
AaronWheezer Oct 3, 2023
09f60ec
working merge with dev branch
AaronWheezer Oct 3, 2023
b93e607
fixed testes erro
AaronWheezer Oct 3, 2023
40e4ef0
fixed errors in index with camelcasing
AaronWheezer Oct 3, 2023
8fe3b92
Changed names of validation files to match repositories and interface…
Axel-RD Oct 3, 2023
f32ee1b
Removed Reservations table from database and deleted related code. Sw…
Axel-RD Oct 3, 2023
e5c1e3b
Updated function to get Klarna_consumer_token. Should work now. Issue…
SweOlle Oct 4, 2023
2f17718
Changed a status in the db test data
Axel-RD Oct 4, 2023
f3757a2
Removed new prefix from index.js and affected files
Axel-RD Oct 4, 2023
ac1e461
changed certain datatypes in db, renamed date column in ElectricityTa…
Axel-RD Oct 4, 2023
982fcb6
Renamed the variable name 'chargerID' to 'connectorID' in all files. …
SweOlle Oct 5, 2023
aac3254
Add charger and remove unused credentials from GitHub workflow file
loan21xw Oct 6, 2023
448dc4d
Skipped PyTest in GitHub workflow file
loan21xw Oct 6, 2023
2e522e8
Install awilix in GitHub workflow file and move to before docker-comp…
loan21xw Oct 6, 2023
5be3bf4
Clean up in GitHub workflow file
loan21xw Oct 6, 2023
51bf2f7
Merge pull request #212 from AlexTelon/refactoring-database-structure
loan21xw Oct 6, 2023
0052f31
Merge branch 'feature/#209-Update-klarna-consumer-token-every-request…
loan21xw Oct 6, 2023
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: 16 additions & 26 deletions .github/workflows/backend-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,43 +42,33 @@ jobs:
envkey_USER_POOL: ${{ secrets.USER_POOL }}
envkey_USER_POOL_ID: ${{ secrets.USER_POOL_ID }}
envkey_USER_POOL_SECRET: ${{ secrets.USER_POOL_SECRET }}
envkey_DATABASE_NAME: ${{ secrets.DATABASE_NAME }}
envkey_DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }}
envkey_DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
envkey_DATABASE_HOST: ${{ secrets.DATABASE_HOST }}
envkey_DATABASE_NAME: "UNNEEDED"
envkey_DATABASE_USERNAME: "UNNEEDED"
envkey_DATABASE_PASSWORD: "UNNEEDED"
envkey_DATABASE_HOST: "UNNEEDED"
envkey_KLARNA_TOKEN: ${{ secrets.KLARNA_TOKEN }}
directory: backend-app/

# # Runs sequentially to starting the back-end app
# - name: Install requirements
# # Installs the requirements
# run: |
# export PYTHONPATH=.
# pip install -r ./test/requirements.txt

# Run the backend app
# & is used to signal that this task will keep running, as to not get stuck on this step
- name: launch docker container
run: |
docker-compose build
docker-compose up &

# Runs sequentially to starting the back-end app
- name: Install requirements
# Installs the requirements
run: |
export PYTHONPATH=.
pip install -r ./test/requirements.txt
docker-compose up --build -d

# Executes the tests within the /backend_tests folder
- name: Run PyTest
run: python -m pytest ./test/backend_tests --junit-xml=report.xml

- name: Install Jest
run: |
npm i jest
npm i jest-junit

- name: Install axios
run: |
npm i axios
# - name: Run PyTest
# run: python -m pytest ./test/backend_tests --junit-xml=report.xml

- name: Run unit tests
run:
npm test --prefix ./backend-app
run: |
docker exec flexicharge-backend "npm" "test"

# Displays a summary and overlook of test cases
- name: Publish test result
Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ Needed to start app.
- updateTransactionPayment(transactionId: int, paymentId: int))
- updateTransactionMeter(transactionId: int, meterValue: int))
```
- **databaseInterfaceReservations**
```
- addReservation(chargerId: int, userId: int, start: int, stop: int, function(errors, reservation))
- getReservation(reservationId: int, function(errors, reservation))
- getReservationForUser(userId: int, function(errors, reservations))
- getReservationForCharger(chargerId: int, function(errors, reservations))
- removeReservation(reservationId: int, function(errors, reservationRemoved: bool))
```



Expand Down
Loading
Loading