Skip to content

Commit 5371607

Browse files
committed
test: add bindle keyring & secret keys
Signed-off-by: Frank Yang <[email protected]>
1 parent 188336a commit 5371607

File tree

4 files changed

+56
-2
lines changed

4 files changed

+56
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ test-integration:
3030

3131
.PHONY: test-e2e
3232
test-e2e:
33-
RUST_LOG=$(LOG_LEVEL) cargo test --test integration --features e2e-tests --no-fail-fast -- integration_tests::test_dependencies --nocapture
34-
RUST_LOG=$(LOG_LEVEL) cargo test --test integration --features e2e-tests --no-fail-fast -- --skip integration_tests::test_dependencies --nocapture --include-ignored
33+
RUST_LOG=$(LOG_LEVEL) cargo test --test integration --features e2e-tests --no-fail-fast -- integration_tests::e2e_tests::test_dependencies --nocapture
34+
RUST_LOG=$(LOG_LEVEL) cargo test --test integration --features e2e-tests --no-fail-fast -- --skip integration_tests::e2e_tests::test_dependencies --nocapture --include-ignored
3535

3636
.PHONY: test-sdk-go
3737
test-sdk-go:

tests/http/keyring.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version = "1.0"
2+
3+
[[key]]
4+
label = "Test<[email protected]>"
5+
roles = ["creator"]
6+
key = "HfXxdRvgUWEE0f36EIa8+njPJVoMvmF6/gO/T19aV90="
7+
labelSignature = "En2GtxiLbzAIoFu2zQ5HWXwck5lONq/ALYGt8RQYUDNpStk23JcaN/Gx9zh9oEJGnVeDwHLNj9/Cql6j23O1Cw=="

tests/http/secret_keys.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version = "1.0"
2+
3+
[[key]]
4+
label = "Test<[email protected]>"
5+
keypair = "O6QdMC7mvxepvqDIXtj9b66ooMf4Mlz4Mmz65Em2Q8Ed9fF1G+BRYQTR/foQhrz6eM8lWgy+YXr+A79PX1pX3Q=="
6+
roles = ["creator"]

tests/integration.rs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ mod integration_tests {
4646
const BINDLE_SERVER_BASIC_AUTH_HTPASSWD_FILE: &str = "tests/http/htpasswd";
4747
const BINDLE_SERVER_BASIC_AUTH_USER: &str = "bindle-user";
4848
const BINDLE_SERVER_BASIC_AUTH_PASSWORD: &str = "topsecret";
49+
const BINDLE_SECRET_FILE: &str = "tests/http/secret_keys.toml";
50+
const BINDLE_KEYRING_FILE: &str = "tests/http/keyring.toml";
51+
const BINDLE_LABEL: &str = "\"Test<[email protected]>\"";
4952

5053
const HIPPO_BASIC_AUTH_USER: &str = "hippo-user";
5154
const HIPPO_BASIC_AUTH_PASSWORD: &str = "topsecret";
@@ -85,6 +88,12 @@ mod integration_tests {
8588
),
8689
"--bindle-server",
8790
&b.url,
91+
"--bindle-secret-file",
92+
BINDLE_SECRET_FILE,
93+
"--bindle-keyring-file",
94+
BINDLE_KEYRING_FILE,
95+
"--bindle-label",
96+
BINDLE_LABEL,
8897
],
8998
None,
9099
)?;
@@ -125,6 +134,12 @@ mod integration_tests {
125134
BINDLE_SERVER_BASIC_AUTH_USER,
126135
"--bindle-password",
127136
BINDLE_SERVER_BASIC_AUTH_PASSWORD,
137+
"--bindle-secret-file",
138+
BINDLE_SECRET_FILE,
139+
"--bindle-keyring-file",
140+
BINDLE_KEYRING_FILE,
141+
"--bindle-label",
142+
BINDLE_LABEL,
128143
],
129144
None,
130145
)?;
@@ -161,6 +176,12 @@ mod integration_tests {
161176
),
162177
"--bindle-server",
163178
&b.url,
179+
"--bindle-secret-file",
180+
BINDLE_SECRET_FILE,
181+
"--bindle-keyring-file",
182+
BINDLE_KEYRING_FILE,
183+
"--bindle-label",
184+
BINDLE_LABEL,
164185
],
165186
None,
166187
)?;
@@ -205,6 +226,12 @@ mod integration_tests {
205226
),
206227
"--bindle-server",
207228
&b.url,
229+
"--bindle-secret-file",
230+
BINDLE_SECRET_FILE,
231+
"--bindle-keyring-file",
232+
BINDLE_KEYRING_FILE,
233+
"--bindle-label",
234+
BINDLE_LABEL,
208235
],
209236
None,
210237
)?;
@@ -259,6 +286,12 @@ mod integration_tests {
259286
),
260287
"--bindle-server",
261288
&b.url,
289+
"--bindle-secret-file",
290+
BINDLE_SECRET_FILE,
291+
"--bindle-keyring-file",
292+
BINDLE_KEYRING_FILE,
293+
"--bindle-label",
294+
BINDLE_LABEL,
262295
],
263296
None,
264297
)?;
@@ -311,6 +344,12 @@ mod integration_tests {
311344
HIPPO_BASIC_AUTH_USER,
312345
"--hippo-password",
313346
HIPPO_BASIC_AUTH_PASSWORD,
347+
"--bindle-secret-file",
348+
BINDLE_SECRET_FILE,
349+
"--bindle-keyring-file",
350+
BINDLE_KEYRING_FILE,
351+
"--bindle-label",
352+
BINDLE_LABEL,
314353
],
315354
None,
316355
)?;
@@ -389,6 +428,8 @@ mod integration_tests {
389428
server_cache.path().to_string_lossy().to_string().as_str(),
390429
"-i",
391430
address.as_str(),
431+
"--keyring",
432+
BINDLE_KEYRING_FILE,
392433
],
393434
auth_args.as_slice(),
394435
]

0 commit comments

Comments
 (0)