Skip to content

Commit

Permalink
Fix e2e test data
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts committed Sep 13, 2022
1 parent 0844467 commit 7f1c050
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ import (

"github.com/caraml-dev/turing/api/turing/models"
"github.com/stretchr/testify/assert"
"github.com/tidwall/gjson"
)

/*
Steps:
Create a new router with valid config for enricher, ensembler, router.
Create a new router with valid config for the router.
a. Test GET router immediately > empty config
b. Wait for success response from deployment
c. Test GET router version > status shows "deployed"
Expand Down Expand Up @@ -44,22 +43,9 @@ func TestDeployRouterWithRouteNamePathInStandardEnsembler(t *testing.T) {
assert.Equal(t, http.StatusOK, response.StatusCode,
"Unexpected response (code %d): %s",
response.StatusCode, string(responsePayload))
actualResponse := gjson.GetBytes(responsePayload, "response").String()
actualResponse := string(responsePayload)
expectedResponse := `{
"experiment": {
"configuration": {
"foo":"bar",
}
},
"route_responses": [
{
"data": {
"version": "control"
},
"is_default": false,
"route": "control"
}
]
"version" : "control"
}`
assert.JSONEq(t, expectedResponse, actualResponse)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"type": "standard",
"standard_config": {
"experiment_mappings": [],
"route_name_path": "treatment.configuration.policy.route_name"
"route_name_path": "route_name"
}
},
"default_route_id": "control"
Expand Down

0 comments on commit 7f1c050

Please sign in to comment.