c12i / mpesa-rust

A MPESA API sdk in Rust
https://c12i.github.io/mpesa-rust/mpesa/index.html
MIT License
43 stars 14 forks source link

Fix Doc Tests Compilation #99

Closed Borwe closed 7 months ago

Borwe commented 7 months ago

Basically replaced:

env!("CLIENT_KEY")
env!("CLIENT_SECRET") 

with

std::env::var("CLIENT_KEY").unwrap(),
std::env::var("CLIENT_SECRET").unwrap(),

since the env variables aren't available at compile time we can't use env! directly.

Fixes #97

Borwe commented 7 months ago

Hmm... Still failing, this is interesting lol.

c12i commented 7 months ago

@Borwe thanks for checking this out

the strange thing was that even with env! the tests passed before, my guess is that either the API are down or there are breaking changes that need to be accounted for

c12i commented 7 months ago

will have a closer look at this over the weekend

itsyaasir commented 7 months ago

This issue has been fixed, all the tests are passing.

itsyaasir commented 7 months ago

This issue has been fixed, Thanks @Borwe