Repository navigation
Refactor integration tests #215
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
569c136
Use separate setup and cleanup for every integration test
Max13245 b3855a4
Implement simple test config
Max13245 18f420a
Create --config-path flag for integration tests
Max13245 980da7f
Update docs and CHANGELOG
Max13245 bc8d090
Small fixes
Max13245 5e1c275
Remove old code and review changes
Max13245 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| [alias] | ||
| build-install = "run --package xtask-build-install --" | ||
| package-build = "run --package xtask-package-build --" | ||
| xtest = "run --package xtask-test-runner --" | ||
| xtest = "test --features integration-tests" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,31 @@ | ||
| // SPDX-License-Identifier: GPL-3.0-only | ||
| use crate::packit; | ||
| use crate::{common::environment::Environment, packit}; | ||
|
|
||
| #[test] | ||
| fn version() { | ||
| packit!("--version").assert().success(); | ||
| let env = Environment::init(); | ||
| packit!(env, "--version").assert().success(); | ||
| env.clean(); | ||
| } | ||
|
|
||
| #[test] | ||
| fn info_requirements() { | ||
| let env = Environment::init(); | ||
|
|
||
| // Install simple package for test | ||
| _ = packit!("install", "simple@0.0.1", "--build").ok(); | ||
| _ = packit!(env, "install", "simple@0.0.1", "--build").assert().success(); | ||
|
|
||
| packit!("info", "--tree").assert().failure(); | ||
| packit!("info", "--active").assert().failure(); | ||
| packit!("info", "--tree --active").assert().failure(); | ||
| packit!("info", "simple", "--tree").assert().failure(); | ||
| packit!(env, "info", "--tree").assert().failure(); | ||
| packit!(env, "info", "--active").assert().failure(); | ||
| packit!(env, "info", "--tree --active").assert().failure(); | ||
| packit!(env, "info", "simple", "--tree").assert().failure(); | ||
|
|
||
| packit!("info").assert().success(); | ||
| packit!("info", "simple").assert().success(); | ||
| packit!("info", "simple@0.0.1").assert().success(); | ||
| packit!("info", "simple@0.0.1", "--tree").assert().success(); | ||
| packit!("info", "simple", "--active").assert().success(); | ||
| packit!("info", "simple", "--tree", "--active").assert().success(); | ||
| packit!(env, "info").assert().success(); | ||
| packit!(env, "info", "simple").assert().success(); | ||
| packit!(env, "info", "simple@0.0.1").assert().success(); | ||
| packit!(env, "info", "simple@0.0.1", "--tree").assert().success(); | ||
| packit!(env, "info", "simple", "--active").assert().success(); | ||
| packit!(env, "info", "simple", "--tree", "--active").assert().success(); | ||
|
|
||
| // Cleanup simple package after test | ||
| _ = packit!("uninstall", "simple").ok(); | ||
| env.clean(); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.