(version string)
| 544 | } |
| 545 | |
| 546 | func sessionWithPluginVersion(version string) func(http.ResponseWriter, *http.Request) { |
| 547 | return func(w http.ResponseWriter, _ *http.Request) { |
| 548 | w.Header().Set("Content-Type", "application/json") |
| 549 | w.WriteHeader(http.StatusCreated) |
| 550 | _ = json.NewEncoder(w).Encode(map[string]any{ |
| 551 | "token": "cqpd_payload.sig", |
| 552 | "api_url": "https://x.us.platform.cloudquery.io", |
| 553 | "expires_in_seconds": 604800, |
| 554 | "plugin_version": version, |
| 555 | }) |
| 556 | } |
| 557 | } |
| 558 | |
| 559 | func TestInject_PlatformPinnedVersion(t *testing.T) { |
| 560 | srv := fakeCloud(t, nil, sessionWithPluginVersion("v2.5.0")) |
no test coverage detected