Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

test: DIDComm Router - Rest Binding BDD tests #1281

Merged
merged 1 commit into from
Feb 18, 2020

Conversation

rolsonquadras
Copy link
Contributor

@rolsonquadras rolsonquadras commented Feb 18, 2020

closes #1169

Signed-off-by: Rolson Quadras [email protected]

@codecov
Copy link

codecov bot commented Feb 18, 2020

Codecov Report

Merging #1281 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          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.

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

@rolsonquadras rolsonquadras requested review from fqutishat, troyronda and a team February 18, 2020 21:09
#

@all
@aries_router_rest
Copy link
Contributor

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

Copy link
Contributor Author

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 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

route_controller_steps.go

Copy link
Contributor Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

fmt.Println :)

Copy link
Contributor Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

failed to handle invitation :)

Copy link
Contributor Author

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)
Copy link
Contributor

@sudeshrshetty sudeshrshetty Feb 18, 2020

Choose a reason for hiding this comment

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

handle invitation :)

Copy link
Contributor Author

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.

@troyronda troyronda merged commit e88a0cf into hyperledger-archives:master Feb 18, 2020
@rolsonquadras rolsonquadras deleted the issue-1169 branch February 19, 2020 19:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

DIDComm Router - BDD tests for REST binding
3 participants