Skip to content

Commit

Permalink
chore: remove expected error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
gnkz committed Nov 1, 2023
1 parent e249bd7 commit 734f005
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,30 @@ env:
FOUNDRY_PROFILE: ci

jobs:
run:
name: Run forge
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build image
run: docker build . -t nomoixyz/vulcan-test-suite
- name: Run tests
run: docker run --rm nomoixyz/vulcan-test-suite
format:
name: Check format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly

- name: Print forge version
run: forge --version
- name: Run forge fmt

- name: Check formatting
run: forge fmt --check
- name: Run forge test
run: forge test
4 changes: 1 addition & 3 deletions test/examples/results/ResultsExample02.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ contract ResultExample is Test {
CommandResult result = commands.run(["asdf12897u391723"]);

// Use unwrap to revert with the default error message
ctx.expectRevert(
"The command was not executed: \"Failed to execute command: No such file or directory (os error 2)\""
);
ctx.expectRevert();
result.unwrap();

// Use expect to revert with a custom error message
Expand Down
5 changes: 1 addition & 4 deletions test/modules/Commands.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ contract CommandsTest is Test {
function testUnwrapReverts() external {
CommandResult result = commands.run(["nonexistentcommand", "--hlkfshjfhjas"]);

bytes memory expectedError =
bytes("The command was not executed: \"Failed to execute command: No such file or directory (os error 2)\"");

ctx.expectRevert(expectedError);
ctx.expectRevert();

result.unwrap();
}
Expand Down

0 comments on commit 734f005

Please sign in to comment.