8000 feat: Add Client for Workorders service Test plans and Test plan template APIs by ammarhusain-EMR · Pull Request #137 · ni/nisystemlink-clients-python · GitHub
[go: up one dir, main page]

Skip to content

feat: Add Client for Workorders service Test plans and Test plan template APIs #137

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

Conversation

ammarhusain-EMR
Copy link
Contributor

What does this Pull Request accomplish?

Added Create, Delete, and Query Test plan template APIs in Workorder service.

Why should this Pull Request be merged?

This test plan template client will improve user interactivity with those Workorder Service endpoints.

What testing has been done?

Automated integration tests are included.
API Link: Swagger-link

Aravindhan Palanisamy added 2 commits May 23, 2025 22:47
@ammarhusain-EMR ammarhusain-EMR requested a review from rbell517 May 23, 2025 17:33
Aravindhan Palanisamy added 2 commits May 23, 2025 23:06
@aravindhan-ni
Copy link
Contributor

@rbell517, need you help

We've reviewed the code on our end and everything looks good. I also ran the tests locally against the test environment, and they all passed successfully.

However, the pipeline is failing due to a 405 error in one of the examples. It seems like the endpoint might not be available in the pipeline environment. Given that, I believe the integration test should fail in such cases. Am I missing anything?

@rbell517
Copy link
Collaborator
rbell517 commented May 23, 2025

@rbell517, need you help

We've reviewed the code on our end and everything looks good. I also ran the tests locally against the test environment, and they all passed successfully.

However, the pipeline is failing due to a 405 error in one of the examples. It seems like the endpoint might not be available in the pipeline environment. Given that, I believe the integration test should fail in such cases. Am I missing anything?

@ammarhusain-EMR @aravindhan-ni
Funny situation actually. pytest is trying to run your example file as a test because it starts with test_. Examples are not intended to be run by the pipeline as tests.

You will need to modify the pytest setup in pyproject.toml to tell pytest to find tests in just the tests directory. Example toml.

[tool.pytest.ini_options]
...
testpaths = ["tests"]

@rbell517
Copy link
Collaborator

Another important note on the integration tests -- If you are creating a pull request from a fork you don't have permission to use the repo's main-test API key secret, so it will actually skip all the integration tests. You would need to make a PR in your fork and setup your own API key secret to use the github action to actually run the integration tests. I've been meaning to track down a fix to this but I haven't gotten to it.

Aravindhan Palanisamy and others added 2 commits May 24, 2025 11:17
Co-authored-by: Richard Bell <418101+rbell517@users.noreply.github.com>
@ammarhusain-EMR ammarhusain-EMR requested a review from rbell517 May 26, 2025 04:54
@aravindhan-ni aravindhan-ni force-pushed the users/ammar/feat/test_plan_template_api branch from 5e41415 to f34f0fb Compare May 26, 2025 11:44
Aravindhan Palanisamy and others added 3 commits May 26, 2025 19:11
@aravindhan-ni
Copy link
Contributor
aravindhan-ni commented May 26, 2025

Another important note on the integration tests -- If you are creating a pull request from a fork you don't have permission to use the repo's main-test API key secret, so it will actually skip all the integration tests. You would need to make a PR in your fork and setup your own API key secret to use the github action to actually run the integration tests. I've been meaning to track down a fix to this but I haven't gotten to it.

I had set up the same pipeline in forked repo. The tests are passed
image

@rbell517 rbell517 enabled auto-merge (squash) May 27, 2025 16:59
auto-merge was automatically disabled May 28, 2025 07:21

Head branch was pushed to by a user without write access

@MuthuRajan-S MuthuRajan-S merged commit 953686c into ni:master May 28, 2025
12 checks passed
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.

5 participants
0