Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

refactor: Remove EDV from BDD tests #331

Merged
merged 1 commit into from
Sep 12, 2022
Merged

Conversation

ypukhta
Copy link
Contributor

@ypukhta ypukhta commented Sep 1, 2022

Remove EDV support from KMS BDD tests

Signed-off-by: Yevgen Pukhta eugene.pukhta@gmail.com

@cla-bot cla-bot bot added the cla-signed label Sep 1, 2022
@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #331 (7e79241) into main (190aa2d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #331   +/-   ##
=======================================
  Coverage   86.59%   86.59%           
=======================================
  Files          26       26           
  Lines        2223     2223           
=======================================
  Hits         1925     1925           
  Misses        186      186           
  Partials      112      112           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ypukhta ypukhta changed the title DRAFT - Remove EDV refactor: Remove EDV Sep 1, 2022
@ypukhta ypukhta force-pushed the issue-326 branch 2 times, most recently from 6680924 to 471c530 Compare September 9, 2022 09:19
@ypukhta ypukhta marked this pull request as draft September 9, 2022 13:55
@ypukhta ypukhta force-pushed the issue-326 branch 2 times, most recently from 9f3bd05 to aa5815a Compare September 9, 2022 17:48
@ypukhta ypukhta marked this pull request as ready for review September 9, 2022 17:58
)

func (s *Steps) storeSecretInHubAuth(userName string) error {
func (s *Steps) loginIntoAuthServer(userName string) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo here - I think you mean logInToAuthServer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

if err != nil {
return err
}
//if err := s.createDID(u); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you meant to leave this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@@ -39,133 +27,32 @@ type signer interface {
Alg() string
}

type authzKMSSigner struct {
type zCapAuthUserSigner struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be zcapAuthUserSigner not zCapAuthUserSigner

Copy link
Collaborator

Choose a reason for hiding this comment

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

(ZCAP is an acronym, so should be in all caps, except when at the beginning of an unexported name, in which case it's all lowercase)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

s *Steps
authzUser *user
}

func newAuthzKMSSigner(s *Steps, authzUser *user) *authzKMSSigner {
return &authzKMSSigner{s: s, authzUser: authzUser}
func newZCapAuthUserSigner(s *Steps, authzUser *user) *zCapAuthUserSigner {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be newZCAPAuthUserSigner not newZCapAuthUserSigner

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

o.bearerToken = token
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

if this is not needed, remove plz bearerToken from options struct and behavior related to setting Authorization header in DoRequest method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@@ -181,10 +174,3 @@ func WithSigner(signer requestSigner) Opt {
o.signer = signer
}
}

// WithParsedResponse specifies type to unmarshal response body.
func WithParsedResponse(r interface{}) Opt {
Copy link
Contributor

Choose a reason for hiding this comment

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

consider cleaning up parsedResponse-related behavior as well (the same considerations as for bearerToken case above)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

Signed-off-by: Yevgen Pukhta <eugene.pukhta@gmail.com>

Signed-off-by: Yevgen Pukhta <eugene.pukhta@gmail.com>
@ypukhta ypukhta changed the title refactor: Remove EDV refactor: Remove EDV from BDD tests Sep 12, 2022
@ypukhta ypukhta merged commit b6d0f24 into trustbloc:main Sep 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants