-
Notifications
You must be signed in to change notification settings - Fork 162
test: DIDComm Router - Rest Binding BDD tests #1281
test: DIDComm Router - Rest Binding BDD tests #1281
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1281 +/- ##
======================================
Coverage 91.7% 91.7%
======================================
Files 126 126
Lines 7808 7808
======================================
Hits 7160 7160
Misses 368 368
Partials 280 280 Continue to review full report at Codecov.
|
# | ||
|
||
@all | ||
@aries_router_rest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"aries_router_controller" ? just to maintain same naming convention like other tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since controller can be rest or wasm, I named it as rest. But looks like our bdd tests refer controller for rest api tests - updated the name to controller for consistency.
@@ -0,0 +1,136 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
route_controller_steps.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func (d *RESTSteps) RegisterRoute(agentID, varName string) error { | ||
connectionID := d.bddContext.Args[varName] | ||
|
||
fmt.Println("connectionID == ", connectionID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Println :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil | ||
} | ||
|
||
return fmt.Errorf("failed to handle invitation: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failed to handle invitation :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated :)
|
||
err := sendHTTP(http.MethodPost, destination+"/route/register", registerRouteReq{ConnectionID: connectionID}, nil) | ||
if err != nil { | ||
return fmt.Errorf("failed to handle invitation: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handle invitation :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// RegisterSteps registers router steps | ||
func (d *RESTSteps) RegisterSteps(s *godog.Suite) { | ||
s.Step(`^"([^"]*)" sets connection "([^"]*)" as the router$`, d.RegisterRoute) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Signed-off-by: Rolson Quadras <[email protected]>
f16bd06
to
16e9234
Compare
closes #1169
Signed-off-by: Rolson Quadras [email protected]