Skip to content

Commit

Permalink
bug: compile fails with secrets in resource configs (#1353)
Browse files Browse the repository at this point in the history
* bug: compile fails with secrets in resource configs

* test: update
  • Loading branch information
chesedo committed Oct 27, 2023
1 parent 04ded73 commit e79639e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codegen/src/shuttle_main/mod.rs
Expand Up @@ -241,7 +241,7 @@ impl ToTokens for Loader {
.get_secrets()
.await?
.into_iter()
.map(|(key, value)| (format!("secrets.{}", key), value))
.map(|(key, value)| (format!("secrets.{}", key), value.expose().clone()))
);
)),
Some(parse_quote!(
Expand Down Expand Up @@ -507,7 +507,7 @@ mod tests {
) -> ShuttleComplex {
use shuttle_runtime::Context;
use shuttle_runtime::{Factory, ResourceBuilder};
let vars = std::collections::HashMap::from_iter(factory.get_secrets().await?.into_iter().map(|(key, value)| (format!("secrets.{}", key), value)));
let vars = std::collections::HashMap::from_iter(factory.get_secrets().await?.into_iter().map(|(key, value)| (format!("secrets.{}", key), value.expose().clone())));
let pool = shuttle_runtime::get_resource (
shuttle_shared_db::Postgres::new().size(&shuttle_runtime::strfmt("10Gb", &vars)?).public(false),
&mut factory,
Expand Down

0 comments on commit e79639e

Please sign in to comment.