diff options
author | Matan Kushner <hello@matchai.me> | 2019-05-16 09:40:30 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-16 09:40:30 -0600 |
commit | 2cf69a82b7fcb4d61c853f54488e0b02d301033e (patch) | |
tree | d84889473d6bfe3f5b014c8afc945f918cda916b /tests | |
parent | 90d6e6cf0b22520a5177e8e842acbb142482e4eb (diff) |
ci: Fix CI to work with changes to Azure Pipelines build agent (#55)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Dockerfile | 2 | ||||
-rw-r--r-- | tests/directory.rs | 10 | ||||
-rw-r--r-- | tests/python.rs | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/tests/Dockerfile b/tests/Dockerfile index 8218fd312..ef00a407d 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -28,7 +28,7 @@ RUN goenv global $GO_VERSION RUN go version # Install Python -ENV PYTHON_VERSION 3.7.2 +ENV PYTHON_VERSION 3.6.8 ENV PYENV_ROOT /root/.pyenv ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH RUN curl https://pyenv.run | bash \ diff --git a/tests/directory.rs b/tests/directory.rs index 38efc2988..d14b7fc25 100644 --- a/tests/directory.rs +++ b/tests/directory.rs @@ -67,9 +67,9 @@ fn root_directory() -> io::Result<()> { #[test] fn directory_in_root() -> io::Result<()> { - let dir = Path::new("/opt"); + let dir = Path::new("/tmp"); - let expected = format!("via {} ", Color::Cyan.bold().paint("/opt").to_string()); + let expected = format!("via {} ", Color::Cyan.bold().paint("/tmp").to_string()); let actual = common::render_module("dir", &dir); assert_eq!(expected, actual); @@ -79,7 +79,7 @@ fn directory_in_root() -> io::Result<()> { #[test] #[ignore] fn truncated_directory_in_root() -> io::Result<()> { - let dir = Path::new("/opt/starship/thrusters/rocket"); + let dir = Path::new("/tmp/starship/thrusters/rocket"); fs::create_dir_all(&dir)?; let expected = format!( @@ -98,7 +98,7 @@ fn truncated_directory_in_root() -> io::Result<()> { #[test] #[ignore] fn git_repo_root() -> io::Result<()> { - let tmp_dir = TempDir::new()?; + let tmp_dir = TempDir::new_in(home_dir().unwrap())?; let repo_dir = tmp_dir.path().join("rocket-controls"); fs::create_dir(&repo_dir)?; @@ -117,7 +117,7 @@ fn git_repo_root() -> io::Result<()> { #[test] #[ignore] fn directory_in_git_repo() -> io::Result<()> { - let tmp_dir = TempDir::new()?; + let tmp_dir = TempDir::new_in(home_dir().unwrap())?; let repo_dir = tmp_dir.path().join("rocket-controls"); let dir = repo_dir.join("src"); fs::create_dir_all(&dir)?; diff --git a/tests/python.rs b/tests/python.rs index f497e5716..237c1f306 100644 --- a/tests/python.rs +++ b/tests/python.rs @@ -15,7 +15,7 @@ fn folder_with_python_version() -> io::Result<()> { let expected = format!( "via {} ", Segment::new("python") - .set_value("🐍 v3.7.2") + .set_value("🐍 v3.6.8") .set_style(Color::Yellow.bold()) ); let actual = common::render_module("python", &dir.path()); @@ -33,7 +33,7 @@ fn folder_with_requirements_txt() -> io::Result<()> { let expected = format!( "via {} ", Segment::new("python") - .set_value("🐍 v3.7.2") + .set_value("🐍 v3.6.8") .set_style(Color::Yellow.bold()) ); let actual = common::render_module("python", &dir.path()); @@ -51,7 +51,7 @@ fn folder_with_pyproject_toml() -> io::Result<()> { let expected = format!( "via {} ", Segment::new("python") - .set_value("🐍 v3.7.2") + .set_value("🐍 v3.6.8") .set_style(Color::Yellow.bold()) ); let actual = common::render_module("python", &dir.path()); @@ -69,7 +69,7 @@ fn folder_with_py_file() -> io::Result<()> { let expected = format!( "via {} ", Segment::new("python") - .set_value("🐍 v3.7.2") + .set_value("🐍 v3.6.8") .set_style(Color::Yellow.bold()) ); let actual = common::render_module("python", &dir.path()); |