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

Use translib's new api-tests app in REST gotest #52

Merged
merged 1 commit into from
Jul 15, 2020

Conversation

sachinholla
Copy link
Contributor

- Why I did it

REST go tests were failing due to failures in ACL request.

- How I did it

1) Modified ProcessXXX testcases to use new api-tests app instead of ACL
app. This allows running end-to-end positive and negative tests without
depending on db state and ACL logic. Added few more test cases.
Depends on sonic-net/sonic-mgmt-common#13.

2) Added few more negative test cases to test translib integration.

3) Added a new tool rest-gotest.sh to run REST server tests from source
or already built test binary. Can be used with tparse or gotestsum too.

rest-gotest.sh               /* run all tests from source */
rest-gotest.sh -bin          /* run already built test binary */
rest-gotest.sh -run Process  /* run only ProcessXXX tests */
rest-gotest.sh -bin -json | tparse
gotestsum -f testname --raw-command -- rest-gotest.sh -json

- How to verify it

REST server gotest

- Description for the changelog

Use translib's new api-tests app in REST gotest

1) Modified ProcessXXX testcases to use new api-tests app instead of ACL
app. This allows running end-to-end positive and negative tests without
depending on db state and ACL logic. Added few more test cases.

2) Added a new tool rest-gotest.sh to run REST server tests from source
or already built test binary. Can be used with tparse or gotestsum too.

rest-gotest.sh               /* run all tests from source */
rest-gotest.sh -bin          /* run already built test binary */
rest-gotest.sh -run Process  /* run only ProcessXXX tests */
rest-gotest.sh -bin -json | tparse
gotestsum -f testname --raw-command -- rest-gotest.sh -json

Signed-off-by: Sachin Holla <sachin.holla@broadcom.com>
@renukamanavalan
Copy link

retest this please

@renukamanavalan renukamanavalan merged commit b4cafc9 into sonic-net:master Jul 15, 2020
@sachinholla sachinholla deleted the gotestfix branch July 21, 2020 02:32
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.

2 participants