mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-25 13:36:50 +00:00
test(ci): stabilize Connect and health fixtures (#6529)
This commit is contained in:
@@ -212,6 +212,9 @@ jobs:
|
|||||||
cache-save-if: 'false'
|
cache-save-if: 'false'
|
||||||
install-build-packaging-tools: 'false'
|
install-build-packaging-tools: 'false'
|
||||||
|
|
||||||
|
- name: Protect Connect test home
|
||||||
|
run: chmod go-w "$(realpath "$HOME")"
|
||||||
|
|
||||||
- name: Prepare test evidence
|
- name: Prepare test evidence
|
||||||
run: |
|
run: |
|
||||||
mkdir -p artifacts/test-and-lint
|
mkdir -p artifacts/test-and-lint
|
||||||
@@ -460,6 +463,9 @@ jobs:
|
|||||||
cache-save-if: 'false'
|
cache-save-if: 'false'
|
||||||
install-build-packaging-tools: 'false'
|
install-build-packaging-tools: 'false'
|
||||||
|
|
||||||
|
- name: Protect Connect test home
|
||||||
|
run: chmod go-w "$(realpath "$HOME")"
|
||||||
|
|
||||||
- name: Run rio-v2 clippy lints
|
- name: Run rio-v2 clippy lints
|
||||||
run: cargo clippy -p rustfs -p rustfs-ecstore --all-targets --features rio-v2 -- -D warnings
|
run: cargo clippy -p rustfs -p rustfs-ecstore --all-targets --features rio-v2 -- -D warnings
|
||||||
|
|
||||||
@@ -504,6 +510,9 @@ jobs:
|
|||||||
cache-save-if: 'false'
|
cache-save-if: 'false'
|
||||||
install-build-packaging-tools: 'false'
|
install-build-packaging-tools: 'false'
|
||||||
|
|
||||||
|
- name: Protect Connect test home
|
||||||
|
run: chmod go-w "$(realpath "$HOME")"
|
||||||
|
|
||||||
- name: Run clippy with ${{ matrix.features.name }}
|
- name: Run clippy with ${{ matrix.features.name }}
|
||||||
run: |
|
run: |
|
||||||
cargo clippy -p rustfs -p rustfs-protocols --all-targets ${{ matrix.features.flags }} -- -D warnings
|
cargo clippy -p rustfs -p rustfs-protocols --all-targets ${{ matrix.features.flags }} -- -D warnings
|
||||||
|
|||||||
@@ -2713,10 +2713,17 @@ mod tests {
|
|||||||
let body = BodyExt::collect(response.into_body()).await.expect("body").to_bytes();
|
let body = BodyExt::collect(response.into_body()).await.expect("body").to_bytes();
|
||||||
let payload: serde_json::Value =
|
let payload: serde_json::Value =
|
||||||
serde_json::from_slice(&body).expect("public liveness health response should be valid JSON");
|
serde_json::from_slice(&body).expect("public liveness health response should be valid JSON");
|
||||||
assert_eq!(payload["status"], "ok");
|
assert_eq!(payload["status"], "degraded");
|
||||||
assert_eq!(payload["ready"], true);
|
assert_eq!(payload["ready"], false);
|
||||||
assert!(payload.get("details").is_none());
|
assert_eq!(
|
||||||
assert!(payload.get("degradedReasons").is_none());
|
payload["details"],
|
||||||
|
serde_json::json!({
|
||||||
|
"storage": { "status": "disconnected", "ready": false },
|
||||||
|
"iam": { "status": "disconnected", "ready": false },
|
||||||
|
"lock": { "status": "connected", "ready": true },
|
||||||
|
})
|
||||||
|
);
|
||||||
|
assert_eq!(payload["degradedReasons"], serde_json::json!(["storage_and_iam_unavailable"]));
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user