-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor gceurlmap to a struct representation #254
Conversation
2ca3194
to
dd5bec2
Compare
dd5bec2
to
7963173
Compare
The tests in controller_test.go need a really big refactor so I am commenting out the portions which cause the unit tests to fail for now. I would like to really dig into fixing how those tests are written in a separate PR. |
7963173
to
fcb69c1
Compare
Decided to modify tests and fakes accordingly to make all tests work. Still want to dig deeper into controller_test.go later and fix it up. |
fcb69c1
to
2fa7e1a
Compare
continue | ||
} | ||
pathToBackend := map[string]string{} | ||
// Using a mapping of regex -> backend here ensures that we don't |
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.
Let's not use the word regex
as this confuses users. Stick with path?
pkg/utils/gceurlmap.go
Outdated
|
||
// PathRule encapsulates the information for a single path -> backend mapping. | ||
type PathRule struct { | ||
// Path is a regex. |
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.
sans regex
2fa7e1a
to
0734d79
Compare
0734d79
to
0e26a15
Compare
/lgtm |
Will fix tests once approach looks good.
/assign @nicksardo