Skip to content

Commit

Permalink
Revert "Add docker for integration tests" (#36)
Browse files Browse the repository at this point in the history
This reverts commit 67d938c.
  • Loading branch information
Matan Kushner committed Apr 28, 2019
1 parent 67d938c commit 5980a0a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 123 deletions.
1 change: 0 additions & 1 deletion .dockerignore

This file was deleted.

15 changes: 11 additions & 4 deletions azure-pipelines.yml
Expand Up @@ -20,6 +20,15 @@ jobs:
- script: cargo fmt --all -- --check
displayName: Run Rustfmt

- job: "Bench"
pool:
vmImage: "ubuntu-16.04"
container: "rust:latest"
condition: eq(variables['Build.Reason'], 'PullRequest')
steps:
- script: cargo bench
displayName: Run benchmark

- job: "Test"
strategy:
matrix:
Expand All @@ -41,9 +50,6 @@ jobs:
pool:
vmImage: "ubuntu-16.04"
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.0.0'
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
Expand All @@ -57,5 +63,6 @@ jobs:
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: cargo build --all
displayName: Cargo build
- script: cargo test -- --ignored
# Until env stubbing is solved, make tests run on a single thread
- script: cargo test --all -- --test-threads=1
displayName: Cargo test
13 changes: 0 additions & 13 deletions integration_test

This file was deleted.

36 changes: 0 additions & 36 deletions tests/Dockerfile

This file was deleted.

20 changes: 7 additions & 13 deletions tests/directory.rs
@@ -1,5 +1,4 @@
use ansi_term::Color;
use dirs::home_dir;
use git2::Repository;
use starship::segment::Segment;
use std::fs;
Expand All @@ -26,8 +25,7 @@ fn home_directory() -> io::Result<()> {
#[test]
#[ignore]
fn directory_in_home() -> io::Result<()> {
let dir = home_dir().unwrap().join("starship/engine");
fs::create_dir_all(&dir)?;
let dir = Path::new("~/starship/engine");

let expected = Segment::new("dir")
.set_value("~/starship/engine")
Expand All @@ -42,8 +40,7 @@ fn directory_in_home() -> io::Result<()> {
#[test]
#[ignore]
fn truncated_directory_in_home() -> io::Result<()> {
let dir = home_dir().unwrap().join("starship/engine/schematics");
fs::create_dir_all(&dir)?;
let dir = Path::new("~/starship/engine/schematics");

let expected = Segment::new("dir")
.set_value("starship/engine/schematics")
Expand All @@ -70,11 +67,12 @@ fn root_directory() -> io::Result<()> {
}

#[test]
#[ignore]
fn directory_in_root() -> io::Result<()> {
let dir = Path::new("/opt");
let dir = Path::new("/private");

let expected = Segment::new("dir")
.set_value("/opt")
.set_value("/private")
.set_style(Color::Cyan.bold())
.output();
let actual = common::render_segment("dir", &dir);
Expand All @@ -86,11 +84,10 @@ fn directory_in_root() -> io::Result<()> {
#[test]
#[ignore]
fn truncated_directory_in_root() -> io::Result<()> {
let dir = Path::new("/opt/starship/thrusters/rocket");
fs::create_dir_all(&dir)?;
let dir = Path::new("/private/var/folders/3s");

let expected = Segment::new("dir")
.set_value("starship/thrusters/rocket")
.set_value("var/folders/3s")
.set_style(Color::Cyan.bold())
.output();
let actual = common::render_segment("dir", &dir);
Expand All @@ -100,7 +97,6 @@ fn truncated_directory_in_root() -> io::Result<()> {
}

#[test]
#[ignore]
fn git_repo_root() -> io::Result<()> {
let tmp_dir = TempDir::new()?;
let repo_dir = tmp_dir.path().join("rocket-controls");
Expand All @@ -119,7 +115,6 @@ fn git_repo_root() -> io::Result<()> {
}

#[test]
#[ignore]
fn directory_in_git_repo() -> io::Result<()> {
let tmp_dir = TempDir::new()?;
let repo_dir = tmp_dir.path().join("rocket-controls");
Expand All @@ -139,7 +134,6 @@ fn directory_in_git_repo() -> io::Result<()> {
}

#[test]
#[ignore]
fn truncated_directory_in_git_repo() -> io::Result<()> {
let tmp_dir = TempDir::new()?;
let repo_dir = tmp_dir.path().join("rocket-controls");
Expand Down
56 changes: 0 additions & 56 deletions tests/nodejs.rs

This file was deleted.

0 comments on commit 5980a0a

Please sign in to comment.