Skip to content

Commit

Permalink
Read the testdata from stdin instead of file
Browse files Browse the repository at this point in the history
  • Loading branch information
slarwise committed Aug 9, 2024
1 parent 26c73c4 commit 3fff505
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 22 deletions.
29 changes: 25 additions & 4 deletions scripts/populate
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
#!/bin/sh

export VAULT_ADDR=http://127.0.0.1:8200
export VAULT_TOKEN=dev-only-token
vault kv put -mount secret /user @testdata/a.json
vault kv put -mount secret /creds @testdata/b.json
vault kv put -mount secret /azure/the @testdata/c.json
vault kv put -mount secret /yolo/swag @testdata/d.json

echo '{
"roles": ["reader", "writer"],
"token": "abc123",
"url": "https://example.com"
}' |
vault kv put -mount secret /user -
echo '{
"client_id": "free",
"client_secret": "palestine"
}' |
vault kv put -mount secret /creds -
echo '{
"user": "vim",
"password": "actually-emacs"
}' |
vault kv put -mount secret /azure/the -
echo '{
"tenant-id": "oopa",
"client-id": "gangnamn",
"client-secret": "style"
}' |
vault kv put -mount secret /yolo/swag -
5 changes: 0 additions & 5 deletions testdata/a.json

This file was deleted.

4 changes: 0 additions & 4 deletions testdata/b.json

This file was deleted.

4 changes: 0 additions & 4 deletions testdata/c.json

This file was deleted.

5 changes: 0 additions & 5 deletions testdata/d.json

This file was deleted.

0 comments on commit 3fff505

Please sign in to comment.