Skip to content

Commit fa04970

Browse files
Copilotdiasbruno
andauthored
Mark deprecated name arg and align client creation in tests
Agent-Logs-Url: https://github.com/cl-sdk/io.github.cl-sdk.wst/sessions/9199f57b-a9c4-424c-9c46-02842ca3d950 Co-authored-by: diasbruno <362368+diasbruno@users.noreply.github.com>
1 parent 5ef95ff commit fa04970

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

feature-flag/routing.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Example:
4444
(request-data-key :feature-flag-evaluation-context))
4545
"Create a feature-flag client composed with request-scoped context.
4646
OBJECT-OF-INTEREST defaults to REQUEST and is used by RESOLVE-PROVIDER.
47-
NAME is accepted for backward compatibility; it was used by the removed CREATE-CLIENT API and is currently unused.
47+
NAME is deprecated and accepted only for backward compatibility; it was used by the removed CREATE-CLIENT API and is currently unused.
4848
Example:
4949
(client-for-request request :domain \"payments\" :evaluation-context '(:app \"checkout\"))
5050
=> #<CLIENT ...>"

t/feature-flag-tests.lisp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@
122122
(test evaluation-context-merges-client-and-invocation-with-right-precedence
123123
(let* ((provider (make-instance 'static-provider :name "static"
124124
:values '(("flag-a" . t))))
125-
(client (make-instance 'client :provider provider
126-
:domain "default"
127-
:client-evaluation-context '(:shared :client :client-only 2))))
125+
(client (acquire-client provider)))
126+
(setf (slot-value client 'io.github.cl-sdk.wst.feature-flag::evaluation-context)
127+
'(:shared :client :client-only 2))
128128
(is-true (get-boolean-value client "flag-a" nil :evaluation-context '(:shared :call :call-only 3)))
129129
(let ((ctx (static-provider-last-context provider)))
130130
(is (eq :call (getf ctx :shared)))

0 commit comments

Comments
 (0)