Skip to content

Commit

Permalink
options not filters; remove old reverse proxy image from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Nov 30, 2023
1 parent 00b1ad1 commit b3d070d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
run: |
sudo apt-get update && sudo apt-get install -y libolm3 libolm-dev
go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
docker pull ghcr.io/matrix-org/complement-crypto-reverse-proxy:latest
# Install whatever version of the JS SDK is in package.json
- name: Build JS SDK
Expand Down
6 changes: 3 additions & 3 deletions internal/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (d *SlidingSyncDeployment) SlidingSyncURL(t *testing.T) string {
return d.slidingSyncURL
}

func (d *SlidingSyncDeployment) SetMITMFilters(t *testing.T, filters map[string]string) {
func (d *SlidingSyncDeployment) SetMITMOptions(t *testing.T, options map[string]string) {
t.Helper()
proxyURL, err := url.Parse(d.controllerURL)
must.NotError(t, "failed to parse controller URL", err)
Expand All @@ -58,9 +58,9 @@ func (d *SlidingSyncDeployment) SetMITMFilters(t *testing.T, filters map[string]
},
}
jsonBody, err := json.Marshal(map[string]interface{}{
"filters": filters,
"options": options,
})
must.NotError(t, "failed to marshal filters", err)
must.NotError(t, "failed to marshal options", err)
req, err := http.NewRequest("POST", magicMITMURL, bytes.NewBuffer(jsonBody))
must.NotError(t, "failed to prepare request", err)
req.Header.Set("Content-Type", "application/json")
Expand Down
8 changes: 4 additions & 4 deletions tests/addons/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
app = Flask("mitmoptset")

@app.route("/", methods=["POST"])
def set_filters() -> str:
def set_options() -> str:
body = request.json
filters = body.get("filters", {})
print(f"setting filters {filters}")
for k, v in filters:
options = body.get("options", {})
print(f"setting options {options}")
for k, v in options:
ctx.options[k] = v
return {}

Expand Down

0 comments on commit b3d070d

Please sign in to comment.