-
Notifications
You must be signed in to change notification settings - Fork 15
test(ffe): add agentless end-to-end harness #7298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8c6712f
cf6126a
9af665a
5d5e341
73ad331
9db41fc
71aacb0
eb57dc6
c9f955e
9c5169e
36a9710
2375e76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| """Test default agentless UFC delivery before FFE evaluation.""" | ||
|
|
||
| import json | ||
|
|
||
| from utils import features, scenarios, weblog | ||
| from utils.mocked_backend.ffe import CONFIG_PATH | ||
|
|
||
|
|
||
| @scenarios.feature_flagging_and_experimentation_agentless | ||
| @features.feature_flags_agentless | ||
| class Test_FFE_Agentless_Configuration: | ||
| def setup_default_agentless_source(self) -> None: | ||
| self.response = weblog.post( | ||
| "/ffe", | ||
| json={ | ||
| "flag": "empty-targeting-key-flag", | ||
| "variationType": "STRING", | ||
| "defaultValue": "default", | ||
| "targetingKey": "user-1", | ||
| "attributes": {}, | ||
| }, | ||
| ) | ||
|
|
||
| def test_default_agentless_source(self) -> None: | ||
| assert self.response.status_code == 200, f"Flag evaluation failed: {self.response.text}" | ||
| assert json.loads(self.response.text)["value"] == "on-value" | ||
|
|
||
| backend_status = scenarios.feature_flagging_and_experimentation_agentless.mock_backend_status() | ||
| assert backend_status is not None | ||
| assert backend_status["requests_total"] >= 1 | ||
| assert backend_status["last_path"] == CONFIG_PATH | ||
| assert backend_status["last_auth_present"] is True | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -456,6 +456,42 @@ def test_otel_test_file(self): | |
| "", | ||
| ) | ||
|
|
||
| def test_agentless_ffe_test_file(self): | ||
| inputs = build_inputs(modified_files=["tests/ffe/test_agentless_configuration.py"]) | ||
| assert_github_processor( | ||
| inputs, | ||
| default_libs_with_prod, | ||
| default_libs_with_dev, | ||
| 3600, | ||
| "false", | ||
| "DEFAULT,FEATURE_FLAGGING_AND_EXPERIMENTATION_AGENTLESS", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When this test file changes, this new expectation makes the CI selector emit Useful? React with 👍 / 👎. |
||
| "", | ||
| ) | ||
|
|
||
| def test_agentless_ffe_mocked_backend_file(self): | ||
| inputs = build_inputs(modified_files=["utils/mocked_backend/ffe.py"]) | ||
| assert_github_processor( | ||
| inputs, | ||
| default_libs_with_prod, | ||
| default_libs_with_dev, | ||
| 3600, | ||
| "false", | ||
| "DEFAULT,FEATURE_FLAGGING_AND_EXPERIMENTATION_AGENTLESS,PARAMETRIC", | ||
| "", | ||
| ) | ||
|
|
||
| def test_end_to_end_scenario_framework_file(self): | ||
| inputs = build_inputs(modified_files=["utils/_context/_scenarios/endtoend.py"]) | ||
| assert_github_processor( | ||
| inputs, | ||
| default_libs_with_prod, | ||
| default_libs_with_dev, | ||
| 3600, | ||
| "false", | ||
| "DEFAULT,FEATURE_FLAGGING_AND_EXPERIMENTATION_AGENTLESS", | ||
| "end_to_end", | ||
| ) | ||
|
|
||
| def test_json_modification(self): | ||
| inputs = build_inputs(modified_files=["tests/debugger/utils/probe_snapshot_log_line.json"]) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.