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

tests(helpers): separate customized asserts #13628

Merged
merged 5 commits into from
Sep 10, 2024
Merged

Conversation

chronolaw
Copy link
Contributor

@chronolaw chronolaw commented Sep 6, 2024

Summary

KAG-5252

  • move assertions to a separated lua module (only copy, no change)
  • move lookup() to misc module

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #[issue number]

@github-actions github-actions bot added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Sep 6, 2024
@chronolaw chronolaw marked this pull request as ready for review September 6, 2024 03:36
@@ -0,0 +1,823 @@
local cjson = require("cjson.safe")
Copy link
Contributor

@fffonion fffonion Sep 6, 2024

Choose a reason for hiding this comment

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

the naming of spec/details feels bit confusing. we might want to call something like spec/tools or spec/internal.
We also have spec/helpers that some of them also registers the custom assert functions. please consider consolidate them.
not blocker for this specific PR.

Copy link
Contributor Author

@chronolaw chronolaw Sep 6, 2024

Choose a reason for hiding this comment

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

We will do it in the future, thanks. KAG-5330.

Copy link
Member

Choose a reason for hiding this comment

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

I agree that details is not a good name.

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 will rename this directory after these PRs are merged.

@Tieske
Copy link
Member

Tieske commented Sep 6, 2024

please validate that the documentation still renders properly when changing those helper files.

cd spec
ldoc .

should render the docs properly. Users access this through pongo docs.

@chronolaw
Copy link
Contributor Author

chronolaw commented Sep 9, 2024

please validate that the documentation still renders properly when changing those helper files.

cd spec
ldoc .

should render the docs properly. Users access this through pongo docs.

See comment #13630 (comment)

#13636

@windmgc windmgc merged commit 5ac6e1e into master Sep 10, 2024
25 checks passed
@windmgc windmgc deleted the tests/clean_helper_assert branch September 10, 2024 03:43
@team-gateway-bot
Copy link
Collaborator

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-13628-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-13628-to-master-to-upstream
git checkout -b cherry-pick-13628-to-master-to-upstream
ancref=$(git merge-base b861d1fc030c43923151241d7e4f6710ab2a3a5a b558c17f6aace568554f4ca613affb2b4ac40cee)
git cherry-pick -x $ancref..b558c17f6aace568554f4ca613affb2b4ac40cee

@github-actions github-actions bot added the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Sep 10, 2024
@kikito kikito removed the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee size/XXL skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants