Skip to content

Commit

Permalink
comment out main.rs tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstevens19 committed Jul 21, 2024
1 parent 8ff14c1 commit 854fd26
Showing 1 changed file with 54 additions and 57 deletions.
111 changes: 54 additions & 57 deletions rindexer_rust_playground/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use std::{env, path::PathBuf, str::FromStr};
use std::env;

use rindexer::{
manifest::yaml::read_manifest, start_rindexer, GraphqlOverrideSettings, IndexingDetails,
StartDetails,
};
use rindexer::{start_rindexer, GraphqlOverrideSettings, IndexingDetails, StartDetails};

use self::rindexer_lib::indexers::all_handlers::register_all_handlers;

Expand Down Expand Up @@ -74,55 +71,55 @@ async fn main() {
}
}

#[allow(dead_code)]
fn generate() {
let path = PathBuf::from_str(
"/Users/joshstevens/code/rindexer/rindexer_rust_playground/rindexer.yaml",
)
.expect("Invalid path");
let manifest = read_manifest(&path).expect("Failed to read manifest");
rindexer::generator::build::generate_rindexer_typings(&manifest, &path, true)
.expect("Failed to generate typings");
}

#[allow(dead_code)]
fn generate_code_test() {
let path = PathBuf::from_str(
"/Users/joshstevens/code/rindexer/rindexer_rust_playground/rindexer.yaml",
)
.expect("Invalid path");
let manifest = read_manifest(&path).expect("Failed to read manifest");

rindexer::generator::build::generate_rindexer_handlers(manifest, &path, true)
.expect("Failed to generate handlers");
}

#[allow(dead_code)]
fn generate_all() {
let path = PathBuf::from_str(
"/Users/joshstevens/code/rindexer/rindexer_rust_playground/rindexer.yaml",
)
.expect("Invalid path");
rindexer::generator::build::generate_rindexer_typings_and_handlers(&path)
.expect("Failed to generate typings and handlers");
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_generate() {
generate();
}

#[test]
fn test_code_generate() {
generate_code_test();
}

#[test]
fn test_generate_all() {
generate_all();
}
}
// #[allow(dead_code)]
// fn generate() {
// let path = PathBuf::from_str(
// "/Users/joshstevens/code/rindexer/rindexer_rust_playground/rindexer.yaml",
// )
// .expect("Invalid path");
// let manifest = read_manifest(&path).expect("Failed to read manifest");
// rindexer::generator::build::generate_rindexer_typings(&manifest, &path, true)
// .expect("Failed to generate typings");
// }
//
// #[allow(dead_code)]
// fn generate_code_test() {
// let path = PathBuf::from_str(
// "/Users/joshstevens/code/rindexer/rindexer_rust_playground/rindexer.yaml",
// )
// .expect("Invalid path");
// let manifest = read_manifest(&path).expect("Failed to read manifest");
//
// rindexer::generator::build::generate_rindexer_handlers(manifest, &path, true)
// .expect("Failed to generate handlers");
// }
//
// #[allow(dead_code)]
// fn generate_all() {
// let path = PathBuf::from_str(
// "/Users/joshstevens/code/rindexer/rindexer_rust_playground/rindexer.yaml",
// )
// .expect("Invalid path");
// rindexer::generator::build::generate_rindexer_typings_and_handlers(&path)
// .expect("Failed to generate typings and handlers");
// }
//
// #[cfg(test)]
// mod tests {
// use super::*;
//
// #[test]
// fn test_generate() {
// generate();
// }
//
// #[test]
// fn test_code_generate() {
// generate_code_test();
// }
//
// #[test]
// fn test_generate_all() {
// generate_all();
// }
// }

0 comments on commit 854fd26

Please sign in to comment.