Skip to content

Commit 446fdb4

Browse files
Merged in branch chapter-11
commit 8db4595 Author: Rogerio Oliveira <[email protected]> Date: Mon Apr 10 01:06:19 2023 +0200 changed the target folder reference in git ignore file; changed the name of rust.rs to build.rs; fixed config env variables; added integration tests lib module; changed the api project main file to easier the tests; commit d680e87 Author: Rogerio Oliveira <[email protected]> Date: Sat Apr 8 13:40:05 2023 +0200 - wip; added new env variable "API_SERVICE_URL" to easier test; added mock-server to enable service api to be tested; added config tests [test unset config is failling]; moved the dotenv initialisation from config to main; added authorisation test; added pagination test; - mock-server created a mock server to emulate badword service;
1 parent 213feba commit 446fdb4

File tree

16 files changed

+3391
-95
lines changed

16 files changed

+3391
-95
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
BAD_WORDS_API_KEY=API_KEY
22
PASETO_KEY="VERSED GRUMPY HARBOR DUKE DEGREE" #32 characters in total
3+
API_SERVICE_URL="API_SERVICE_URL"
34
PORT=8080
45
LOG_LEVEL=info
56
POSTGRES_USER=postgres

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/target
1+
target
22
stderr.log
33
.vscode
44
setup.toml

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ tokio = { version = "1.2", features = ["full"] }
1010
warp = "0.3"
1111
serde = { version = "1.0", features = ["derive"] }
1212
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
13-
handle-errors = { path = "handle-errors" }
13+
handle-errors = { path = "handle-errors", version = " 0.1.0" }
14+
mock-server = { path = "mock-server", version = " 0.1.0" }
1415
uuid = { version = "0.8", features = ["v4"] }
1516
tracing = { version = "0.1", features = ["log"] }
1617
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

rust.rs renamed to build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn generate_cargo_keys() {
1717
Cow::from("unknown")
1818
}
1919
Err(err) => {
20-
println!("cargo:warning=Failed to execute git command: {}", Err);
20+
println!("cargo:warning=Failed to execute git command: {}", err);
2121
Cow::from("unknown")
2222
}
2323
};

0 commit comments

Comments
 (0)