Skip to content

Commit

Permalink
Ci fixups: async-std tests + don't expect out dir to exist
Browse files Browse the repository at this point in the history
  • Loading branch information
mzeitlin11 committed Nov 26, 2023
1 parent 9836631 commit 3c817c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion async-stripe/src/client/base/async_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ mod tests {
mock.assert_hits_async(1).await;

match res {
Err(StripeError::Stripe(x)) => println!("{:?}", x),
Err(StripeError::Stripe(x, _)) => println!("{:?}", x),
_ => panic!("Expected stripe error {:?}", res),
}
}
Expand Down
11 changes: 7 additions & 4 deletions openapi/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::fmt::Debug;
use std::fs;
use std::fs::File;
use std::path::Path;

use anyhow::{bail, Context, Result};
use clap::Parser;
Expand Down Expand Up @@ -68,11 +69,13 @@ fn main() -> Result<()> {
let args = Command::parse();

let in_path = args.spec_path;
let out_path = args.out;
fs::remove_dir_all(&out_path).context("could not remove out folder")?;
fs::create_dir_all(&out_path).context("could not create out folder")?;
let out_path = Path::new(&args.out);
if out_path.exists() {
fs::remove_dir_all(out_path).context("could not remove out folder")?;
}
fs::create_dir_all(out_path).context("could not create out folder")?;

info!("generating code for {} to {}", in_path, out_path);
info!("generating code for {} to {}", in_path, out_path.display());

let spec = if let Some(version) = args.fetch {
let raw = fetch_spec(version, &in_path)?;
Expand Down
2 changes: 1 addition & 1 deletion stripe_types/src/generated/tax_id/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,4 @@ impl stripe_types::Object for TaxId {
Some(self.id.as_str())
}
}
stripe_types::def_id!(TaxIdId, "txi_");
stripe_types::def_id!(TaxIdId, "txi_" | "atxi_");

0 comments on commit 3c817c8

Please sign in to comment.