tada
This commit is contained in:
parent
3a27c7e389
commit
be4e698d61
5 changed files with 13 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -2,8 +2,10 @@
|
|||
.vs/
|
||||
.vscode/
|
||||
.idea/
|
||||
.env
|
||||
|
||||
*.pdf
|
||||
target/
|
||||
go_client/openapi.json
|
||||
crates/storage-sled/sled_db
|
||||
test.db
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ RUN go mod download
|
|||
|
||||
COPY . .
|
||||
# RUN go build -o /app
|
||||
RUN go build
|
||||
CMD go test tests/*
|
||||
|
||||
# FROM docker.io/library/alpine:3.19
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ import (
|
|||
|
||||
var client *vault.Client
|
||||
var ctx context.Context
|
||||
var mountpath = ""
|
||||
// Apparently used as a default if mountpath is an empty string (client library)
|
||||
var mountpath = "/kv-v2"
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
ctx = context.Background()
|
||||
|
|
|
|||
|
|
@ -4,3 +4,5 @@ CREATE TABLE secret_engines (
|
|||
mount_point TEXT PRIMARY KEY NOT NULL,
|
||||
engine_type TEXT NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO secret_engines (mount_point, engine_type) VALUES ('/kv-v2', 'kv');
|
||||
|
|
|
|||
|
|
@ -23,5 +23,10 @@ pub async fn create_pool(db_url: String) -> AnyPool {
|
|||
.await
|
||||
.expect(&db_url);
|
||||
|
||||
sqlx::migrate!()
|
||||
.run(&pool)
|
||||
.await
|
||||
.expect("Failed to apply migrations");
|
||||
|
||||
pool
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue