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

Change addPotentialLink to have ability: link in response. #2346

Merged
merged 3 commits into from
Nov 3, 2021

Conversation

cyber-arsenull
Copy link
Contributor

@cyber-arsenull cyber-arsenull commented Nov 2, 2021

Description

Currently link is unpacked into the response, but in the operation_api_manager.py create_potential_link, which handles this request, it is expected that the data has an ability key. Since there is none, when it goes to build an ability it builds a default 'manual' one instead.

This can be tested by making an operation, and then adding a potential link.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  1. Set breakpoint in create_potential_link in operation_api_manager.py
  2. Start server with debugger attached
  3. Start agent
  4. Start operation
  5. Add potential link manually
  6. At breakpoint trigger step until ability = self.build_ability(data=data.pop('ability', {}), executor=executor)
  7. Check that ability is correctly made (and is not labeled "manual ability" from default values in build_ability)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • [] I have added tests that prove my fix is effective or that my feature works

Currently link is unpacked into the response, but in the operation_api_manager.py create_potential_link which handles this request it is expected that the data has an ability key. Since there is none, when it goes to build an ability it builds a default 'manual' one instead.

This can be tested by making an operation, and then adding a potential link.
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Wohoo! Your first PR -- thanks for contributing!

@codecov
Copy link

codecov bot commented Nov 2, 2021

Codecov Report

Merging #2346 (3e5f40a) into master (b816e9c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2346   +/-   ##
=======================================
  Coverage   72.60%   72.60%           
=======================================
  Files         110      110           
  Lines        7946     7946           
=======================================
  Hits         5769     5769           
  Misses       2177     2177           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b816e9c...3e5f40a. Read the comment docs.

Copy link
Contributor

@ArtificialErmine ArtificialErmine left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarcloud
Copy link

sonarcloud bot commented Nov 3, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@cyber-arsenull cyber-arsenull merged commit f81bcc6 into master Nov 3, 2021
@cyber-arsenull cyber-arsenull deleted the bugfix/gui_add_link_ability branch November 3, 2021 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants