forked from raystack/compass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: deprecate uuid * test: fix and add unit tests * feat: add migration sql to drop uuid column in users table * refactor: remove unused method * feat: add id as response, replacement for uuid * test: update case * feat: update the compass yaml example * refactor: remove unused variable and documentation * feat: separate drop uuid users column to another MR --------- Co-authored-by: Muhammad Luthfi Fahlevi <[email protected]>
- Loading branch information
1 parent
f2972f1
commit 6119ad8
Showing
47 changed files
with
405 additions
and
571 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,6 @@ service: | |
port: 8080 | ||
request_timeout: 10s | ||
identity: | ||
headerkey_uuid: Compass-User-UUID | ||
headerkey_email: Compass-User-Email | ||
provider_default_name: shield | ||
grpc: | ||
|
@@ -72,8 +71,8 @@ worker: | |
|
||
client: | ||
host: localhost:8081 | ||
serverheaderkey_uuid: Compass-User-UUID // if ommited, will use value on service.identity.headerkey_uuid | ||
serverheadervalue_uuid: [email protected] | ||
serverheaderkey_email: Compass-User-Email // if ommited, will use value on service.identity.headerkey_email | ||
serverheadervalue_email: [email protected] | ||
|
||
asset: | ||
additional_types: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ import ( | |
|
||
func TestContext(t *testing.T) { | ||
t.Run("should return passed user if exist in context", func(t *testing.T) { | ||
passedUser := user.User{UUID: "uuid", Email: "email"} | ||
passedUser := user.User{Email: "[email protected]"} | ||
userCtx := user.NewContext(context.Background(), passedUser) | ||
actual := user.FromContext(userCtx) | ||
if !cmp.Equal(passedUser, actual) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,18 +16,18 @@ func TestErrors(t *testing.T) { | |
testCases := []testCase{ | ||
{ | ||
Description: "not found error return correct error string", | ||
Err: user.NotFoundError{UUID: "uuid", Email: "email"}, | ||
ExpectedString: "could not find user with uuid \"uuid\" with email \"email\"", | ||
Err: user.NotFoundError{Email: "[email protected]"}, | ||
ExpectedString: "could not find user with email \"[email protected]\"", | ||
}, | ||
{ | ||
Description: "duplicate error return correct error string", | ||
Err: user.DuplicateRecordError{UUID: "uuid", Email: "email"}, | ||
ExpectedString: "duplicate user with uuid \"uuid\" with email \"email\"", | ||
Err: user.DuplicateRecordError{Email: "[email protected]"}, | ||
ExpectedString: "duplicate user with email \"[email protected]\"", | ||
}, | ||
{ | ||
Description: "invalid error return correct error string", | ||
Err: user.InvalidError{UUID: "uuid"}, | ||
ExpectedString: "empty field with uuid \"uuid\"", | ||
Err: user.InvalidError{Email: "[email protected]"}, | ||
ExpectedString: "empty field with email \"[email protected]\"", | ||
}, | ||
} | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.