nixosTests.ceph-single-node-bluestore: handleTest -> runTest

This commit is contained in:
Sizhe Zhao 2025-06-07 19:22:36 +08:00
parent 9206b0adec
commit 644443d59a
No known key found for this signature in database
GPG Key ID: ED1807251A7DA08F
2 changed files with 207 additions and 213 deletions

View File

@ -297,10 +297,10 @@ in
centrifugo = runTest ./centrifugo.nix;
ceph-multi-node = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./ceph-multi-node.nix;
ceph-single-node = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./ceph-single-node.nix;
ceph-single-node-bluestore = handleTestOn [
ceph-single-node-bluestore = runTestOn [
"aarch64-linux"
"x86_64-linux"
] ./ceph-single-node-bluestore.nix { };
] ./ceph-single-node-bluestore.nix;
ceph-single-node-bluestore-dmcrypt = handleTestOn [
"aarch64-linux"
"x86_64-linux"

View File

@ -1,7 +1,6 @@
import ./make-test-python.nix (
{ pkgs, lib, ... }:
{ lib, ... }:
let
let
cfg = {
clusterId = "066ae264-2a5d-4729-8001-6ad265f50b03";
monA = {
@ -38,11 +37,10 @@ import ./make-test-python.nix (
generateHost =
{
pkgs,
cephConfig,
networkConfig,
...
}:
{ pkgs, ... }:
{
virtualisation = {
emptyDiskImages = [
@ -69,7 +67,7 @@ import ./make-test-python.nix (
networkMonA = {
dhcpcd.enable = false;
interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [
interfaces.eth1.ipv4.addresses = lib.mkOverride 0 [
{
address = cfg.monA.ip;
prefixLength = 24;
@ -101,9 +99,7 @@ import ./make-test-python.nix (
# https://docs.ceph.com/docs/master/install/manual-deployment/
# For other ways to deploy a ceph cluster, look at the documentation at
# https://docs.ceph.com/docs/master/
testscript =
{ ... }:
''
testScript = ''
start_all()
monA.wait_for_unit("network.target")
@ -216,21 +212,19 @@ import ./make-test-python.nix (
monA.wait_until_succeeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'")
monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'")
'';
in
{
in
{
name = "basic-single-node-ceph-cluster-bluestore";
meta = with pkgs.lib.maintainers; {
meta = with lib.maintainers; {
maintainers = [ lukegb ];
};
nodes = {
monA = generateHost {
pkgs = pkgs;
cephConfig = cephConfigMonA;
networkConfig = networkMonA;
};
};
testScript = testscript;
}
)
inherit testScript;
}