Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
neilkakkar committed May 7, 2024
1 parent 777788f commit 1c3481f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion feature-flags/src/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ impl Client for RedisClient {
}

// TODO: Find if there's a better way around this.
// mockall got really annoying with async and results so I'm just gonna do my own
#[derive(Clone)]
pub struct MockRedisClient {
zrangebyscore_ret: Vec<String>,
Expand Down
8 changes: 0 additions & 8 deletions feature-flags/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ pub struct State {
pub fn router<R: Client + Send + Sync + 'static>(redis: Arc<R>) -> Router {
let state = State { redis };

// // Very permissive CORS policy, as old SDK versions
// // and reverse proxies might send funky headers.
// let cors = CorsLayer::new()
// .allow_methods([Method::GET, Method::POST, Method::OPTIONS])
// .allow_headers(AllowHeaders::mirror_request())
// .allow_credentials(true)
// .allow_origin(AllowOrigin::mirror_request());

Router::new()
.route("/flags", post(v0_endpoint::flags).get(v0_endpoint::flags))
.with_state(state)
Expand Down
2 changes: 1 addition & 1 deletion feature-flags/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct ServerHandle {

impl ServerHandle {
pub async fn for_config(config: Config) -> ServerHandle {
let listener = TcpListener::bind("127.0.0.1:3001").await.unwrap();
let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();
let addr = listener.local_addr().unwrap();
let notify = Arc::new(Notify::new());
let shutdown = notify.clone();
Expand Down

0 comments on commit 1c3481f

Please sign in to comment.