Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ba-Feat/badge bot test #502

Merged
merged 53 commits into from
Jan 5, 2023
Merged

ba-Feat/badge bot test #502

merged 53 commits into from
Jan 5, 2023

Conversation

tobi-bams
Copy link
Contributor

No description provided.

@kevkevinpal
Copy link
Contributor

maybe adding functionality to use /badge create ...badge_args would be cool so we don't need to wait for a frontend to be built

@tobi-bams tobi-bams linked an issue Dec 21, 2022 that may be closed by this pull request
@kevkevinpal
Copy link
Contributor

@tobi-bams to test add -b add_bolt here to get the test running using the correct branch and if it works we should be good to merge the sphinx-stack changes and the change it back to master and then merge this change

https://github.com/stakwork/sphinx-relay/pull/502/files#diff-2289f323d1e30f0ec6781fe565465798b0be9d8facf72fad2bd5701e0357a885R64

@tobi-bams
Copy link
Contributor Author

@kevkevinpal yeah, we could use that branch, but for now, the test would still fail because the liquid server is not allowing us to create badges.
We also need to update the boltwall image in Docker Hub

@kevkevinpal
Copy link
Contributor

@tobi-bams do you know if the boltwall container is calling the actual sphinx-liquid server?

@tobi-bams
Copy link
Contributor Author

@tobi-bams do you know if the boltwall container is calling the actual sphinx-liquid server?

Yes it is calling the actual sphinx-liquid server

@kevkevinpal
Copy link
Contributor

@tobi-bams do you know if the boltwall container is calling the actual sphinx-liquid server?

Yes it is calling the actual sphinx-liquid server

Hmm if that's the case then it doesn't make sense to do that in the testing env because then we'll run out of sats very quickly since we're running these test for every PR

it seems like either we need to get a mock response somehow coming from the sphinx-liquid server or get the liquid server working on regtest on sphinx-stack which might be difficult considering it needs the liquid sidechain

@tobi-bams
Copy link
Contributor Author

@tobi-bams do you know if the boltwall container is calling the actual sphinx-liquid server?

Yes it is calling the actual sphinx-liquid server

Hmm if that's the case then it doesn't make sense to do that in the testing env because then we'll run out of sats very quickly since we're running these test for every PR

it seems like either we need to get a mock response somehow coming from the sphinx-liquid server or get the liquid server working on regtest on sphinx-stack which might be difficult considering it needs the liquid sidechain

Yea I agree, I would suggest we go with a mock response

@kevkevinpal
Copy link
Contributor

I'm thinking if it might take a while to include mock responses to sphinx-stack we might want to do extensive unit testing to get this feature going quicker

you can find the unit tests here

https://github.com/stakwork/sphinx-relay/tree/master/src/tests/unit_tests

@Evanfeenstra
Copy link
Contributor

Evanfeenstra commented Jan 2, 2023

Nice job creating tests for it @tobi-bams!. What is you plan to add mocks?

I think you need some more validation in places. Like after const amount = Number(arr[3]) you can check if (!amount) then return a failure text message like "Invalid amount"

Also a good idea to include a /badge help command that returns some help text (like what order the arguments are in)

@tobi-bams
Copy link
Contributor Author

Thanks @Evanfeenstra,
I would be using Mockable.io to mock responses from the liquid server and add this endpoint to the boltwall environment variable.

I would add those extra validations thanks.

In regards to the /badge help I have that already

@Evanfeenstra Evanfeenstra merged commit 1931646 into master Jan 5, 2023
@Evanfeenstra Evanfeenstra deleted the feat/badge-bot-test branch January 9, 2023 19:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Badges: Create badge bot
3 participants