Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: revive via gateway endpoint #460

Merged
merged 4 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: cleanup, document gateway testing
  • Loading branch information
oddgrd committed Nov 3, 2022
commit 66057843527c53f42d73def1b297ffec5ec0fd1b
8 changes: 8 additions & 0 deletions gateway/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# shuttle-gateway

## Tests
To run the tests for gateway, follow the steps in [contributing](https://github.com/shuttle-hq/shuttle/blob/main/CONTRIBUTING.md) to set up your local environment. Then, from the root of the repository, run:

```bash
SHUTTLE_TESTS_RUNTIME_IMAGE=public.ecr.aws/shuttle-dev/deployer:latest SHUTTLE_TESTS_NETWORK=shuttle-dev_user-net cargo test --package shuttle-gateway --all-features -- --nocapture
```
14 changes: 0 additions & 14 deletions gateway/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub struct Args {
pub enum Commands {
Start(StartArgs),
Init(InitArgs),
// Exec(ExecCmds),
}

#[derive(clap::Args, Debug, Clone)]
Expand All @@ -44,19 +43,6 @@ pub struct InitArgs {
pub key: Option<Key>,
}

// #[derive(clap::Args, Debug, Clone)]
// pub struct ExecCmds {
// #[command(flatten)]
// pub context: ContextArgs,
// #[command(subcommand)]
// pub command: ExecCmd,
// }

// #[derive(Subcommand, Debug, Clone)]
// pub enum ExecCmd {
// Revive,
// }

#[derive(clap::Args, Debug, Clone)]
pub struct ContextArgs {
/// Default image to deploy user runtimes into
Expand Down
13 changes: 0 additions & 13 deletions gateway/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ async fn main() -> io::Result<()> {
match args.command {
Commands::Start(start_args) => start(db, start_args).await,
Commands::Init(init_args) => init(db, init_args).await,
// Commands::Exec(exec_cmd) => exec(db, exec_cmd).await,
}
}

Expand Down Expand Up @@ -159,15 +158,3 @@ async fn init(db: SqlitePool, args: InitArgs) -> io::Result<()> {
println!("`{}` created as super user with key: {key}", args.name);
Ok(())
}

// async fn exec(db: SqlitePool, exec_cmd: ExecCmds) -> io::Result<()> {
// let gateway = GatewayService::init(exec_cmd.context.clone(), db).await;

// match exec_cmd.command {
// ExecCmd::Revive => project::exec::revive(gateway)
// .await
// .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?,
// };

// Ok(())
// }