-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove chore identity method * init array with size for performance int vbucket_discovery * reorganize package structure * move function to identity.go file * add helpers/utils test * refactor reflection operation * move identity to root path * removed time.sleep removed wrapper unused go routine * rename package * refactor leaderelector package move it under the k8s package * remove rpc package move code under the servicediscovery package * remove unused import * gofumpt * gofumpt * gofumpt
- Loading branch information
Showing
26 changed files
with
193 additions
and
191 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
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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package helpers | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestIsMetadata_ReturnsTrue_WhenStructHasKeyPrefix(t *testing.T) { | ||
type ts struct { | ||
Key []byte | ||
} | ||
|
||
testData := ts{ | ||
Key: []byte(Prefix + "test"), | ||
} | ||
|
||
assert.True(t, IsMetadata(testData)) | ||
} | ||
|
||
func TestIsMetadata_ReturnsFalse_WhenStructHasNoKeyPrefix(t *testing.T) { | ||
type ts struct { | ||
X []byte | ||
} | ||
|
||
testData := ts{ | ||
X: []byte(Prefix + "test"), | ||
} | ||
|
||
assert.False(t, IsMetadata(testData)) | ||
} |
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
Oops, something went wrong.