fix: resolved comments and rebased
This commit is contained in:
@@ -25,7 +25,7 @@ func TestProviderNew(t *testing.T) {
|
||||
expectedError: true,
|
||||
expectedStatus: http.StatusOK,
|
||||
prepareRequest: func(req *http.Request) {
|
||||
// Add minimal required headers
|
||||
// Add minimal required headers.
|
||||
req.Header.Set("context", "test-context")
|
||||
req.Header.Set("transaction_id", "test-transaction")
|
||||
},
|
||||
@@ -38,7 +38,7 @@ func TestProviderNew(t *testing.T) {
|
||||
expectedError: false,
|
||||
expectedStatus: http.StatusOK,
|
||||
prepareRequest: func(req *http.Request) {
|
||||
// Add headers matching the check keys
|
||||
// Add headers matching the check keys.
|
||||
req.Header.Set("context", "test-context")
|
||||
req.Header.Set("transaction_id", "test-transaction")
|
||||
},
|
||||
|
||||
@@ -71,6 +71,7 @@ func update(wrapper map[string]any, key string, value any) any {
|
||||
wrapper[key] = value
|
||||
return value
|
||||
}
|
||||
|
||||
return field
|
||||
}
|
||||
func isEmpty(v any) bool {
|
||||
@@ -89,12 +90,12 @@ func validateConfig(cfg *Config) error {
|
||||
return errors.New("config cannot be nil")
|
||||
}
|
||||
|
||||
// Check if CheckKeys is empty
|
||||
// Check if CheckKeys is empty.
|
||||
if len(cfg.CheckKeys) == 0 {
|
||||
return errors.New("checkKeys cannot be empty")
|
||||
}
|
||||
|
||||
// Validate that CheckKeys does not contain empty strings
|
||||
// Validate that CheckKeys does not contain empty strings.
|
||||
for _, key := range cfg.CheckKeys {
|
||||
if key == "" {
|
||||
return errors.New("checkKeys cannot contain empty strings")
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewUUIDSetter_SuccessCases(t *testing.T) {
|
||||
func TestNewUUIDSetterSuccessCases(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
config *Config
|
||||
@@ -111,7 +111,7 @@ func TestNewUUIDSetter_SuccessCases(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewUUIDSetter_ErrorCases(t *testing.T) {
|
||||
func TestNewUUIDSetterErrorCases(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
config *Config
|
||||
|
||||
Reference in New Issue
Block a user