Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

[WIP] Add unit tests#15

Open
pawalt wants to merge 21 commits into
developfrom
pawalt/add-unit-tests
Open

[WIP] Add unit tests#15
pawalt wants to merge 21 commits into
developfrom
pawalt/add-unit-tests

Conversation

@pawalt
Copy link
Copy Markdown

@pawalt pawalt commented Jan 3, 2020

This PR resolves #4

Describe your changes
This PR adds unit tests to common and fixes warnings brought up by go-lint

Testing performed
This is it

Additional context
This PR has a lot of small changes to variable naming and such. While we could keep our old names, I'd like to conform to go-lint as much as possible.
Also, this needs to wait until #14 is merged

@pawalt pawalt force-pushed the pawalt/add-unit-tests branch from 9be144c to a51b330 Compare January 3, 2020 16:45
Comment thread internal/common/common.go Outdated
@dennisgove dennisgove requested a review from twexler January 3, 2020 20:24
@pawalt pawalt requested a review from dennisgove January 6, 2020 15:39
@pawalt pawalt force-pushed the pawalt/add-unit-tests branch 2 times, most recently from cd9852b to 0355290 Compare January 8, 2020 14:59
Comment thread internal/common/filetrustsource_test.go Outdated
@pawalt pawalt force-pushed the pawalt/add-unit-tests branch from 0355290 to 6e605c6 Compare January 8, 2020 22:50
Peyton Walters and others added 12 commits January 8, 2020 17:54
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Comment thread internal/common/common_test.go Outdated
Comment thread cmd/plugin/vault-auth-spire.go Outdated
Comment thread internal/common/filetrustsource.go Outdated
Comment thread internal/common/settings.go Outdated
Comment thread internal/common/spiretrustsource.go Outdated
if strings.Contains(domain, "/") {
return fmt.Errorf("expected domain without slash but got %s", domain)
}
certPath := s.certLocation + "/" + domain + ".pem"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You should use filepath here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

What from filepath would be useful?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comment thread internal/common/spiretrustsource.go Outdated
Comment thread internal/common/filetrustsource.go Outdated
@pawalt pawalt force-pushed the pawalt/add-unit-tests branch from 6e605c6 to de6ef85 Compare January 9, 2020 15:50
@pawalt pawalt requested a review from twexler January 9, 2020 16:24
Peyton Walters added 7 commits January 15, 2020 11:45
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Peyton Walters added 2 commits January 15, 2020 17:18
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
Signed-off-by: Peyton Walters <pwalters18@bloomberg.net>
@pawalt pawalt force-pushed the pawalt/add-unit-tests branch from f7c1713 to 1ceae6b Compare January 19, 2020 02:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Unit Tests

3 participants