Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ target/

# init testing directory
test/

mock_data.sh
Empty file modified scripts/README.md
100644 → 100755
Empty file.
40 changes: 40 additions & 0 deletions scripts/e2e-testing/ubuntu-test-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

# This is not meant directly executed
# just the set of commands to install in a fresh ubuntu vm for testing
source mock_data.sh

#TODO test to make sure this works
echo $ADMIN_PASSWD |sudo -S apt install curl
yes | sudo apt install git

# Pipe yes into these installation commands
yes | sudo apt install npm

yes | sudo apt install pkg-config

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y


# Puts cargo on the PATH without having to restart the current shell
. "$HOME/.cargo/env"

curl -sL https://raw.githubusercontent.com/oseda-dev/oseda-cli/refs/heads/main/scripts/curl-install.sh | $SHELL

#TODO: test this in VM before merging branch

# make sure .ssh directory exists
mkdir -p "${HOME}/.ssh"
# add public and private key
echo $PUBLIC_KEY > "${HOME}/.ssh/id_ed25519_oseda_testing.pub"
echo $PRIVATE_KEY > "${HOME}/.ssh/id_ed25519_oseda_testing"
# change permissions for keys
chmod 600 "${HOME}/.ssh/id_ed25519_oseda_testing.pub"
chmod 600 "${HOME}/.ssh/id_ed25519_oseda_testing"

# assuming git username is same as github username
git config --global user.name $USERNAME

oseda init

oseda run
27 changes: 0 additions & 27 deletions scripts/ubuntu-test-install.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/cmd/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fn verify_project(port_num: u16) -> OsedaProjectStatus {

let _run_handle = std::thread::spawn(run::run);

std::thread::sleep(Duration::from_millis(5000));
std::thread::sleep(Duration::from_millis(10000));

let addr = format!("http://localhost:{}", port_num);
let status = match net::get_status(&addr) {
Expand Down
4 changes: 3 additions & 1 deletion src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ use std::{error::Error, path::Path, process::Command};
/// let name = get_config_from_user_git("user.name");
/// ```
pub fn get_config_from_user_git(key: &str) -> Option<String> {

let handle = Command::new("git")
.arg("config")
.arg("list")
.arg("--list")
.output()
.ok()?;


let conf_out = String::from_utf8(handle.stdout).ok()?;

Expand Down
Loading