Skip to content

Commit e588e69

Browse files
committed
Change regular system tests to have /ffe endpoint
1 parent 92d3cc6 commit e588e69

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

utils/build/docker/ruby/rails72/app/controllers/openfeature_controller.rb

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
11
# frozen_string_literal: true
22

3-
require 'openfeature/sdk'
3+
require 'open_feature/sdk'
44
require 'datadog/open_feature/provider'
55

66
class OpenfeatureController < ApplicationController
77
skip_before_action :verify_authenticity_token
88

9-
def start
10-
OpenFeature::SDK.set_provider(Datadog::OpenFeature::Provider.new)
11-
12-
# NOTE: There is no set_provider_and_wait in OpenFeature::SDK
13-
loop do
14-
break unless Datadog::OpenFeature.evaluator.ufc_json.nil?
15-
sleep 0.1
16-
end
17-
18-
render json: {}
19-
end
20-
9+
# TODO: Clarify the expectation of the interface
2110
def evaluate
22-
puts request.body
11+
OpenFeature::SDK.set_provider(Datadog::OpenFeature::Provider.new)
2312

2413
client = OpenFeature::SDK.build_client
2514

utils/build/docker/ruby/rails72/config/routes.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,5 @@ def call(_env)
7878
get '/api_security_sampling/:i' => 'api_security#sampling_by_path'
7979
get '/api_security/sampling/:status' => 'api_security#sampling_by_status'
8080

81-
post '/ffe/start' => 'openfeature#start'
82-
post '/ffe/evaluate' => 'openfeature#evaluate'
81+
post '/ffe' => 'openfeature#start'
8382
end

0 commit comments

Comments
 (0)