-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds some E2E tests * Fix formatting * Implements Display for another model
- Loading branch information
1 parent
109feac
commit 4d59db4
Showing
6 changed files
with
69 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM azul/zulu-openjdk:21-latest | ||
|
||
RUN apt-get update && apt-get install -y git openssh-client bats | ||
RUN cd $HOME && mkdir -p $HOME/.ssh | ||
RUN ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts | ||
RUN git clone https://github.com/dotanuki-labs/android-archives-watchdog.git aaw | ||
|
||
COPY e2e/e2e.bats /usr/e2e.bats | ||
COPY target/release/gradle-wiper /usr/bin/gradle-wiper | ||
RUN chmod +x /usr/bin/gradle-wiper | ||
|
||
CMD ["bats", "/usr/e2e.bats"] |
This file contains 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bats | ||
|
||
current_dir="$(cd "$(dirname "$BATS_TEST_FILENAME")" >/dev/null 2>&1 && pwd)" | ||
|
||
@test "should detect usages of disk" { | ||
run aaw/gradlew tasks -q -p aaw | ||
run gradle-wiper disk evaluate | ||
|
||
echo "$output" | ||
[[ "$output" == *"Total resources (disk space) : 1.1GiB"* ]] | ||
[ "$status" -eq 0 ] | ||
} | ||
|
||
@test "should perform disk shallow wiping" { | ||
run aaw/gradlew shadowJar -q -p aaw | ||
run gradle-wiper disk evaluate | ||
run gradle-wiper disk shallow | ||
|
||
[[ "$output" == *"Reclaimed disk space : 642.1MiB"* ]] | ||
[ "$status" -eq 0 ] | ||
} |
This file contains 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 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 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