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

Issue #936: Refactor Unit Test #1080

Closed
wants to merge 2 commits into from
Closed

Conversation

mayankag32
Copy link

Results from unittest.exe -
Execution finished in 32.298 seconds. Failed: 0 Passed: 56 Skipped: 105 Percentage: 100.00%

[ Please outline your change here. Be sure to check the checkboxes below. ]

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

Copy link

netlify bot commented Feb 11, 2024

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit bc2318a
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/65c908212430830008701753
😎 Deploy Preview https://deploy-preview-1080--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@CLAassistant
Copy link

CLAassistant commented Feb 11, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added documentation Improvements or additions to documentation code Improvements or additions to code. labels Feb 11, 2024
@braindigitalis
Copy link
Contributor

105 tests were skipped, does this still work with online tests?

Copy link
Contributor

@braindigitalis braindigitalis left a comment

Choose a reason for hiding this comment

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

please check requested changes :)

src/unittest/test.h Outdated Show resolved Hide resolved
src/unittest/test.h Outdated Show resolved Hide resolved
src/unittest/test.h Outdated Show resolved Hide resolved
/**
* @brief Perform a test of a REST base API call with one parameter that returns a list
*/
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

weird spacing again

src/unittest/test.h Outdated Show resolved Hide resolved
@mayankag32
Copy link
Author

unit test with token -

UNIT TEST SUMMARY
==================
dpp::snowflake class                                         PASS
dpp::json_interface class                                    PASS
Instantiate DPP cluster                                      FAIL
cluster::start method                                        NOT EXECUTED
Connection to client websocket                               FAIL
Creation of application command                              NOT EXECUTED
Deletion of application command                              NOT EXECUTED
Log events                                                   NOT EXECUTED
Creation of a channel message                                NOT EXECUTED
Editing a channel message                                    NOT EXECUTED
Message edit event                                           NOT EXECUTED
Deletion of a channel message                                NOT EXECUTED
Receipt of a created message                                 NOT EXECUTED
Message attachment send and check                            NOT EXECUTED
Test guild cache                                             NOT EXECUTED
Test user cache                                              NOT EXECUTED
React to a message                                           NOT EXECUTED
Reaction event                                               NOT EXECUTED
Receive guild create event                                   FAIL
Get messages                                                 NOT EXECUTED
crossplatform_strptime()                                     NOT EXECUTED
utility::iconhash                                            PASS
cluster::current_user_get()                                  NOT EXECUTED
cluster::guild_get()                                         NOT EXECUTED
cluster::channel_get()                                       NOT EXECUTED
cluster::channels_get()                                      NOT EXECUTED
cluster::roles_get()                                         NOT EXECUTED
cluster::guild_get_invites()                                 NOT EXECUTED
cluster::guild_get_bans()                                    NOT EXECUTED
cluster::channel_pins_get()                                  NOT EXECUTED
cluster::guild_events_get()                                  NOT EXECUTED
cluster::guild_event_get()                                   NOT EXECUTED
message_create_t::send()                                     NOT EXECUTED
cluster::guild_event_users_get()                             NOT EXECUTED
start timer                                                  NOT EXECUTED
stop timer                                                   NOT EXECUTED
one-shot timer                                               NOT EXECUTED
timed listener                                               NOT EXECUTED
Presence intent                                              FAIL
Instantiate a cache                                          PASS
message_collector                                            FAIL
managed::get_creation_date()                                 PASS
utility::read_file()                                         PASS
ts_to_string()                                               PASS
ts_not_null()                                                PASS
command_option_choice::fill_from_json: double                PASS
command_option_choice::fill_from_json: int64_t               PASS
command_option_choice::fill_from_json: bool                  PASS
command_option_choice::fill_from_json: snowflake             PASS
command_option_choice::fill_from_json: string                PASS
https_client::get_host_info()                                PASS
https_client HTTPS request                                   FAIL
https_client HTTP request                                    PASS
run_once<T>                                                  PASS
webhook construct from URL                                   PASS
Markdown escaping (ignore code block contents)               PASS
Markdown escaping (escape code block contents)               PASS
URL encoding                                                 PASS
Base 64 encoding                                             PASS
sync<T>()                                                    FAIL
manged object comparison                                     PASS
find_channel()                                               NOT EXECUTED
channel type flags                                           NOT EXECUTED
create a forum channel                                       NOT EXECUTED
retrieve the created forum channel                           NOT EXECUTED
delete the created forum channel                             NOT EXECUTED
Human readable error translation                             PASS
cluster::guild_ban_add ban three deleted discord accounts    NOT EXECUTED
cluster::guild_get_ban getting one of the banned accounts    NOT EXECUTED
cluster::guild_get_bans get bans using the after-parameter   NOT EXECUTED
cluster::guild_ban_delete unban the banned discord accounts  NOT EXECUTED
cluster::thread_create                                       NOT EXECUTED
cluster::on_thread_create event                              NOT EXECUTED
cluster::channel_delete with thread                          NOT EXECUTED
cluster::on_thread_delete event                              NOT EXECUTED
cluster::thread_edit                                         NOT EXECUTED
cluster::on_thread_update event                              NOT EXECUTED
cluster::threads_get_active                                  NOT EXECUTED
creating a voice channel                                     NOT EXECUTED
editing the created voice channel                            NOT EXECUTED
deleting the created voice channel                           NOT EXECUTED
permission                                                   PASS
event class                                                  PASS
cluster::user_get                                            NOT EXECUTED
cluster::user_get flag parsing                               NOT EXECUTED
cluster::guild_get_member                                    NOT EXECUTED
user::get_mention                                            PASS
user::get_url                                                PASS
user::format_username                                        PASS
user::get_creation_time                                      PASS
user::get_avatar_url                                         PASS
channel::set_type                                            PASS
channel::get_mention                                         PASS
channel::get_url                                             PASS
message::get_url                                             PASS
utility::guild_navigation                                    PASS
utility::iconhash                                            PASS
utility::make_url_parameters                                 PASS
utility::markdown_escape                                     PASS
utility::tokenize                                            PASS
utility::url_encode                                          PASS
utility::slashcommand_mention                                PASS
utility::channel_mention                                     PASS
utility::user_mention                                        PASS
utility::role_mention                                        PASS
utility::emoji_mention                                       PASS
utility::user_url                                            PASS
utility::message_url                                         PASS
utility::channel_url                                         PASS
utility::thread_url                                          PASS
utility::avatar_size                                         PASS
utility::cdn_endpoint_url_hash                               PASS
sticker::get_url aka utility::cdn_endpoint_url_sticker       PASS
emoji::get_url                                               PASS
role::operator<                                              PASS
cluster::role_create                                         NOT EXECUTED
cluster::role_edit                                           NOT EXECUTED
cluster::role_delete                                         NOT EXECUTED
JSON parse error for post_rest                               PASS
cluster::user_get_cached_sync() with present member          FAIL
cluster::user_get_cached_sync() with not present member      PASS
interaction_create_t::get_parameter() with subcommands       PASS
interaction_create_t::get_parameter() without subcommands    PASS
cluster::automod_rule_create                                 NOT EXECUTED
cluster::automod_rule_get                                    NOT EXECUTED
cluster::automod_rules_get                                   NOT EXECUTED
cluster::automod_rule_delete                                 NOT EXECUTED
using the cluster::request method to fetch an image          NOT EXECUTED
cluster::guild_emoji_create                                  NOT EXECUTED
cluster::guild_emoji_get                                     NOT EXECUTED
cluster::guild_emoji_delete                                  NOT EXECUTED
cluster::on_invite_create                                    NOT EXECUTED
cluster::on_invite_delete                                    NOT EXECUTED
cluster::channel_invite_create                               NOT EXECUTED
cluster::invite_get                                          NOT EXECUTED
cluster::invite_delete                                       NOT EXECUTED
multiheader cookie test                                      SKIPPED
Connect to voice channel                                     SKIPPED
Send audio to voice channel                                  SKIPPED
Pinning a channel message                                    SKIPPED
Unpinning a channel message                                  SKIPPED
cluster::thread_member_add                                   SKIPPED
cluster::thread_member_get                                   SKIPPED
cluster::thread_members_get                                  SKIPPED
cluster::thread_member_remove                                SKIPPED
cluster::on_thread_members_update event with member addition SKIPPED
cluster::on_thread_members_update event with member removal  SKIPPED
cluster::thread_create_with_message                          SKIPPED
message manipulation in thread                               SKIPPED
cluster::on_message_create in thread                         SKIPPED
cluster::on_message_edit in thread                           SKIPPED
cluster::on_message_delete in thread                         SKIPPED
cluster::on_reaction_add in thread                           SKIPPED
cluster::on_reaction_remove in thread                        SKIPPED
coro: offline job                                            SKIPPED
coro: offline coroutine                                      SKIPPED
coro: offline task                                           SKIPPED
coro: offline async                                          SKIPPED
coro: online event handler                                   SKIPPED
coro: online api calls                                       SKIPPED
coro: online mumbo jumbo in event handler                    SKIPPED

Execution finished in 3.441 seconds.
Failed: 78 Passed: 58 Skipped: 25 Percentage: 42.65%

@Mishura4
Copy link
Member

Thanks for contributing!

Make sure you run the full suite of tests including online tests. You'll need to set a couple environment variables, see https://dpp.dev/unit-tests.html

Also pass "full" as the first command argument for some extra tests

@mayankag32
Copy link
Author

Thanks for contributing!

Make sure you run the full suite of tests including online tests. You'll need to set a couple environment variables, see https://dpp.dev/unit-tests.html

Also pass "full" as the first command argument for some extra tests

Thanks for the suggestion, I was looking for environment variables details.

@braindigitalis
Copy link
Contributor

Copy link
Contributor

@Jaskowicz1 Jaskowicz1 left a comment

Choose a reason for hiding this comment

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

Thanks for contributing! Your PR seems to be a near copy-paste of #948 with some minor modifications, was this intended? I'm also assuming you based this PR off that PR as you're attempting to remove Mac support (which was added after #948).

Please correct the Mac support issue, along with the fails shown in your results!

src/unittest/test.h Outdated Show resolved Hide resolved
@Jaskowicz1
Copy link
Contributor

Hi there, are you currently working on readding mac support and fixing the other issues? You seemed to fix the space indentation but left everything else.

@Jaskowicz1
Copy link
Contributor

We've closed this PR due to no activity. The PR also seems to be a direct copy of an old PR that was raised, with some additions. This also breaks our OSX support.

@Jaskowicz1 Jaskowicz1 closed this Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Improvements or additions to code. documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants