Skip to content
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

Implemented test for ir feature #259

Merged
merged 16 commits into from Apr 26, 2024
Merged

Conversation

zaqbez39me
Copy link
Contributor

Test for Impact Ratio (IR) feature in #226

@zaqbez39me
Copy link
Contributor Author

@yegor256 please, check this test out

@zaqbez39me
Copy link
Contributor Author

@yegor256 please, check this test. The pipeline fails because the test is not executable for some reasons. It offers to run chmod

@zaqbez39me
Copy link
Contributor Author

@yegor256 fixed the test disabling method

@yegor256
Copy link
Owner

@zaqbez39me I suggest you wait until the build is clean and then ping me

@yegor256
Copy link
Owner

@zaqbez39me yes, indeed, try to run chmod, it will help

@zaqbez39me
Copy link
Contributor Author

@yegor256 check it out, please. I suppose, it is ready to be merged

tmp=$(mktemp -d /tmp/XXXX)
cd "${tmp}"
mkdir -p "${LOCAL}/${temp}"
"${LOCAL}/metrics/ir.sh" ./ "${LOCAL}/${temp}/stdout"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaqbez39me should fail here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yegor256 you want me to expect the ir.sh failing instead of printing anything here?

git init --quiet .
git config user.email 'foo@example.com'
git config user.name 'Foo'
"${LOCAL}/metrics/ir.sh" ./ "t0"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaqbez39me should fail here

git add "${file2}"
git commit --quiet -m "second file"
"${LOCAL}/metrics/ir.sh" ./ "t2"
grep "No files in given repo " "t0" # There are no files in repo
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaqbez39me
Copy link
Contributor Author

@yegor256 please check it out. I changed the expected behaviour after your review.

set -e
set -o pipefail

# TODO: #259 ENABLE THIS TESTS RIGHT AFTER IMPLEMENTING ir.sh VIA REMOVING `exit 0`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaqbez39me if you use TODO twice -- two issues will be created in the backlog by the robot. We don't want this. Better keep one TODO, where explain what needs to be done in both files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks, will follow it

@yegor256
Copy link
Owner

@zaqbez39me looks good, just one small comment

@yegor256
Copy link
Owner

@zaqbez39me
Copy link
Contributor Author

zaqbez39me commented Apr 25, 2024

@zaqbez39me check this: https://www.yegor256.com/2024/04/01/ping-me-please.html
@yegor256 Sorry, usually I try to stick with this rule

metrics/ir.sh Outdated

output=$(realpath "$2")

# TODO: #259 REPLACE WITH ACTUAL METRIC CODE
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaqbez39me remove this TODO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yegor256 removed it

@yegor256 yegor256 merged commit 75535ec into yegor256:master Apr 26, 2024
9 checks passed
@yegor256
Copy link
Owner

@zaqbez39me thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants