Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

358 service crate unit test coverage #359

Merged
merged 6 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ encryption and replication are secondary
government is not above failure, nor is it entitled to steal from the private sector to conceal its failure. improving government depends on failure [predicting](https://en.wikipedia.org/wiki/Time_travel_debugging) the individuals and laws that must be replaced. flying a flag and demanding loyalty before this step is just misdirection

**q.** how does systemaccounting manage expectation?
**a.** central banks providing "forward guidance" appease more than they set expectation when they allow interest rate manipulation and money printing. systemaccounting prices capital by switching the "risk-free" rate from referencing the hackable price of debt to the immutably recorded price of equity. when the risk-free rate refers to the empirical rate, i.e. to the historical and not the expected, the economy remains protected from the catastrophic failure indulged by intended government mispricing
**a.** central banks providing "forward guidance" appease more than they set expectation when they allow interest rate manipulation and money printing. systemaccounting prices capital by switching the "risk-free" rate from referencing the hackable price of debt to the immutably recorded price of equity. when the risk-free rate refers to the empirical rate, i.e. to the historical and not the expected, the economy remains protected from the catastrophic failure indulged by government mispricing

removing financial appeasement guides the freedom of speech by recalibrating expectation to the empirical

Expand Down
1 change: 1 addition & 0 deletions crates/pg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ serde-aux = { version = "4.4.0", default-features = false }
rust_decimal = { version = "1.34.3", features = ["db-tokio-postgres"] }
geo-types = "=0.7.0"
chrono = "0.4.23"
mockall = "0.12.1"

[dev-dependencies]
dotenvy = "0.15.7"
Expand Down
2 changes: 2 additions & 0 deletions crates/pg/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use crate::postgres::{DatabaseConnection, ToSqlVec};
use crate::sqls::common::TableTrait;
use chrono::{DateTime, Utc};
use geo_types::Point;
use mockall::automock;
use rust_decimal::Decimal;
use std::{error::Error, vec};
use types::{
Expand All @@ -20,6 +21,7 @@ const FIXED_DECIMAL_PLACES: usize = 3;

// todo: add future boilerplate
// https://doc.rust-lang.org/beta/rustc/lints/listing/warn-by-default.html#async-fn-in-trait
#[automock]
pub trait ModelTrait {
async fn insert_account_query(&self, account: String) -> Result<(), Box<dyn Error>>;
async fn delete_owner_account_query(&self, account: String) -> Result<(), Box<dyn Error>>;
Expand Down
4 changes: 4 additions & 0 deletions crates/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ rust_decimal = { version = "1.34.3", default-features = false }
httpclient = { path = "../httpclient" }
pg = { path = "../pg" }
cognitoidp = { path = "../cognitoidp" }

[dev-dependencies]
mockall = "0.12.1"
tokio = { version = "1.35.1", default-features = false, features = ["macros"] }
Loading
Loading