mirror of
https://github.com/prometheus/prometheus.git
synced 2026-06-04 22:22:39 -04:00
Merge pull request #18780 from flying-musk/test-url-state-complex-promql
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests for 32-bit x86 (push) Waiting to run
CI / Go tests for Prometheus upgrades and downgrades (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
govulncheck / Run govulncheck (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests for 32-bit x86 (push) Waiting to run
CI / Go tests for Prometheus upgrades and downgrades (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
govulncheck / Run govulncheck (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
ui: cover PromQL URL-sensitive characters in URL state test
This commit is contained in:
commit
01822f2a7c
1 changed files with 12 additions and 0 deletions
|
|
@ -573,6 +573,18 @@ describe("encode and decode roundtrip", () => {
|
|||
expect(decoded[0].showTree).toBe(original.showTree);
|
||||
});
|
||||
|
||||
test("roundtrip preserves PromQL expressions with URL-sensitive characters", () => {
|
||||
const expr =
|
||||
'sum by (job) (rate(http_requests_total{status!="500",handler=~"/api/v1/.+"}[5m]))';
|
||||
|
||||
const original = createPanel({ expr });
|
||||
const encoded = encodePanelOptionsToURLParams([original]);
|
||||
const decoded = decodePanelOptionsFromURLParams(encoded.toString());
|
||||
|
||||
expect(decoded).toHaveLength(1);
|
||||
expect(decoded[0].expr).toBe(expr);
|
||||
});
|
||||
|
||||
test("roundtrip preserves visualizer settings", () => {
|
||||
const original = createPanel({
|
||||
visualizer: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue