Skip to content

Commit

Permalink
mockserver adds additional / in path (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnieeG authored Jan 10, 2024
1 parent 5caa538 commit 3e60bbc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/mockserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ func (em *MockserverClient) SetValuePath(path string, v int) error {

// SetAnyValuePath sets any type of value for a path
func (em *MockserverClient) SetAnyValuePath(path string, v interface{}) error {
if !strings.HasPrefix(path, "/") {
path = fmt.Sprintf("/%s", path)
}
sanitizedPath := strings.ReplaceAll(path, "/", "_")
id := fmt.Sprintf("%s_mock_id", sanitizedPath)
log.Debug().Str("ID", id).
Expand Down

0 comments on commit 3e60bbc

Please sign in to comment.