File tree 8 files changed +518
-10
lines changed
8 files changed +518
-10
lines changed Original file line number Diff line number Diff line change 52
52
tests :
53
53
name : Tests
54
54
runs-on : ubuntu-latest
55
+ env :
56
+ CS_WORKSPACE_ID : ${{ secrets.CS_WORKSPACE_ID }}
57
+ CS_CLIENT_ACCESS_KEY : ${{ secrets.CS_CLIENT_ACCESS_KEY }}
58
+ CS_CLIENT_ID : ${{ secrets.CS_CLIENT_ID }}
59
+ CS_CLIENT_KEY : ${{ secrets.CS_CLIENT_KEY }}
60
+ PGPORT : 5432
61
+ PGDATABASE : cipherstash
62
+ PGUSER : cipherstash
63
+ PGPASSWORD : password
64
+ PGHOST : localhost
55
65
steps :
56
66
- name : Checkout Code
57
67
uses : actions/checkout@v3
@@ -69,11 +79,12 @@ jobs:
69
79
- name : Install integration test dependencies
70
80
run : npm ci
71
81
working-directory : ./integration-tests
82
+ - name : Set up integration test DB
83
+ run : |
84
+ docker compose up --detach --wait
85
+ npm run eql:download
86
+ npm run eql:install
87
+ working-directory : ./integration-tests
72
88
- name : Test (integration)
73
- env :
74
- CS_WORKSPACE_ID : ${{ secrets.CS_WORKSPACE_ID }}
75
- CS_CLIENT_ACCESS_KEY : ${{ secrets.CS_CLIENT_ACCESS_KEY }}
76
- CS_CLIENT_ID : ${{ secrets.CS_CLIENT_ID }}
77
- CS_CLIENT_KEY : ${{ secrets.CS_CLIENT_KEY }}
78
89
run : npm test
79
90
working-directory : ./integration-tests
Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ cargo.log
8
8
cross.log
9
9
mise.local.toml
10
10
cipherstash.secret.toml
11
+ cipherstash- * .sql
Original file line number Diff line number Diff line change @@ -124,20 +124,31 @@ protect-ffi/
124
124
Integration tests live in the ` ./integration-tests ` directory.
125
125
These tests use the local build of Rust and JavaScript artifacts to test ` @cipherstash/protect-ffi ` as API consumers would.
126
126
127
- These tests rely on CipherStash to be configured (via ` .toml ` config or environment variables).
127
+ These tests rely on:
128
128
129
- Example environment variables to set:
129
+ - CipherStash to be configured (via ` .toml ` config or environment variables), and
130
+ - Environment variables for Postgres to be set
131
+
132
+ Example environment variables:
130
133
```
131
134
CS_CLIENT_ID=
132
135
CS_CLIENT_KEY=
133
136
CS_CLIENT_ACCESS_KEY=
134
137
CS_WORKSPACE_ID=
138
+ PGPORT=5432
139
+ PGDATABASE=cipherstash
140
+ PGUSER=cipherstash
141
+ PGPASSWORD=password
142
+ PGHOST=localhost
135
143
```
136
144
137
145
To run integration tests:
138
146
```
139
147
npm run debug
140
148
cd integration-tests
149
+ docker compose up --detach --wait
150
+ npm run eql:download
151
+ npm run eql:install
141
152
npm run test
142
153
```
143
154
Original file line number Diff line number Diff line change
1
+ services :
2
+ postgres :
3
+ image : postgres:latest
4
+ container_name : protect-ffi-postgres
5
+ environment :
6
+ - POSTGRES_DB=${PGDATABASE:-cipherstash}
7
+ - POSTGRES_USER=${PGUSER:-cipherstash}
8
+ - POSTGRES_PASSWORD=${PGPASSWORD:-password}
9
+ ports :
10
+ - 5432:5432
11
+ restart : always
12
+ healthcheck :
13
+ test : [ "CMD-SHELL", "pg_isready" ]
14
+ interval : 1s
15
+ timeout : 5s
16
+ retries : 10
You can’t perform that action at this time.
0 commit comments