| Code-Review | +1 |
Name: fmt.Sprintf("%s%s", MACHINE_LSES_PREFIX, deviceID),Go conventions typically prefer CamelCase or MixedCaps for constants (e.g., `MachineLSEsPrefix` instead of `MACHINE_LSES_PREFIX`). If this constant is defined in this package, consider renaming it for consistency with Go style guidelines.
mask := &fieldmaskpb.FieldMask{Paths: []string{"pools"}}Consider using the constant `fleetconsolerpc.PathPools` here instead of hardcoding the string `\"pools\"`, to keep the tests resilient to potential constant changes.\n```go\nmask := &fieldmaskpb.FieldMask{Paths: []string{fleetconsolerpc.PathPools}}\n```\n\n(Applies to the other tests in this file as well).
assert.Loosely(t, err.Error(), should.ContainSubstring("device ID cannot be empty"))If `err` is nil, calling `err.Error()` will cause a panic, which might abort the test ungracefully.\n\nYou can use `should.ErrLike` to safely assert on the error content without risking a nil-pointer dereference:\n```go\nassert.Loosely(t, err, should.ErrLike(\"device ID cannot be empty\"))\n```\n\n(This also applies to the other error tests below).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Name: fmt.Sprintf("%s%s", MACHINE_LSES_PREFIX, deviceID),Go conventions typically prefer CamelCase or MixedCaps for constants (e.g., `MachineLSEsPrefix` instead of `MACHINE_LSES_PREFIX`). If this constant is defined in this package, consider renaming it for consistency with Go style guidelines.
this is something that was originally defined in the client, but I've updated it for future use.
mask := &fieldmaskpb.FieldMask{Paths: []string{"pools"}}Consider using the constant `fleetconsolerpc.PathPools` here instead of hardcoding the string `\"pools\"`, to keep the tests resilient to potential constant changes.\n```go\nmask := &fieldmaskpb.FieldMask{Paths: []string{fleetconsolerpc.PathPools}}\n```\n\n(Applies to the other tests in this file as well).
updated, thank you!
assert.Loosely(t, err.Error(), should.ContainSubstring("device ID cannot be empty"))If `err` is nil, calling `err.Error()` will cause a panic, which might abort the test ungracefully.\n\nYou can use `should.ErrLike` to safely assert on the error content without risking a nil-pointer dereference:\n```go\nassert.Loosely(t, err, should.ErrLike(\"device ID cannot be empty\"))\n```\n\n(This also applies to the other error tests below).
fixed, thank you!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |