did-dht icon indicating copy to clipboard operation
did-dht copied to clipboard

trying out running against localhost for test

Open michaelneale opened this issue 1 year ago • 6 comments

We had an issue where prod was down and build was failing - not sure if that was the intention of these client tests, but in this case it runs against local.

An experiment at this stage

michaelneale avatar Jul 25 '24 08:07 michaelneale

Codecov Report

Attention: Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.

Project coverage is 51.21%. Comparing base (b826172) to head (0b8ef0b).

Files Patch % Lines
impl/concurrencytest/main.go 0.00% 24 Missing :warning:
impl/integrationtest/main.go 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #260      +/-   ##
==========================================
+ Coverage   51.14%   51.21%   +0.07%     
==========================================
  Files          31       31              
  Lines        2710     2706       -4     
==========================================
  Hits         1386     1386              
+ Misses       1183     1179       -4     
  Partials      141      141              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jul 25 '24 08:07 codecov-commenter

@michaelneale I believe the failing test is here https://github.com/TBD54566975/did-dht/blob/main/impl/internal/did/client_test.go#L15

the test should be updated to use a mock server

and then we should make sure of the integration/concurrency tests (which AFAIK aren't used at all right now) to do something like what you have here. ideally spin up a docker container, hit the endpoints, etc.

decentralgabe avatar Jul 25 '24 15:07 decentralgabe

@decentralgabe so you prefer a mock server over pointing it to localhost? (so we just test client isolated ideally?)

michaelneale avatar Jul 25 '24 22:07 michaelneale

@michaelneale I'm most concerned with maintaining test functionality in both local and CI environments

if localhost can work for both - no problem

decentralgabe avatar Jul 25 '24 22:07 decentralgabe

@decentralgabe please take a look - I was able to run the mage tests locally, but if you want to try and see if it works for you

michaelneale avatar Jul 26 '24 08:07 michaelneale

well dang, that didn't work.

michaelneale avatar Jul 28 '24 22:07 michaelneale