Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit 4b7724c

Browse files
test: metrics (#297)
LLM (codex) generated based on the test spec
1 parent 1bdea4a commit 4b7724c

File tree

4 files changed

+810
-3
lines changed

4 files changed

+810
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@ jobs:
9191
"repo": "${{ github.repository }}",
9292
"ref": "${{ github.ref }}",
9393
"lang": "rust",
94-
"test_cmd": "cargo test --all-features -- --skip access_token"
94+
"test_cmd": "cargo test --all-features -- --skip access_token --skip metrics"
9595
}
9696
]

src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,7 @@ impl From<IssueAccessTokenInput> for api::access::AccessTokenInfo {
19961996
}
19971997
}
19981998

1999-
#[derive(Debug, Clone, Copy)]
1999+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
20002000
/// Interval to accumulate over for timeseries metric sets.
20012001
pub enum TimeseriesInterval {
20022002
/// Minute.
@@ -2301,7 +2301,7 @@ impl From<GetStreamMetricsInput> for (BasinName, StreamName, api::metrics::Strea
23012301
}
23022302
}
23032303

2304-
#[derive(Debug, Clone, Copy)]
2304+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
23052305
/// Unit in which metric values are measured.
23062306
pub enum MetricUnit {
23072307
/// Size in bytes.

tests/common/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ impl Deref for S2Basin {
7676
}
7777
}
7878

79+
impl S2Basin {
80+
pub fn basin_name(&self) -> &BasinName {
81+
&self.basin_name
82+
}
83+
}
84+
7985
impl AsyncTestContext for S2Basin {
8086
async fn setup() -> Self {
8187
let config = default_s2_config().expect("valid S2 config");
@@ -114,6 +120,16 @@ impl Deref for S2Stream {
114120
}
115121
}
116122

123+
impl S2Stream {
124+
pub fn basin_name(&self) -> &BasinName {
125+
self.basin.basin_name()
126+
}
127+
128+
pub fn stream_name(&self) -> &StreamName {
129+
&self.stream_name
130+
}
131+
}
132+
117133
impl AsyncTestContext for S2Stream {
118134
async fn setup() -> Self {
119135
let basin = SharedS2Basin::setup().await;

0 commit comments

Comments
 (0)