Skip to content

Commit 7ba0647

Browse files
committed
fix: cleanup and adjust test suite
Signed-off-by: Paul Kroeher <paul.kroeher@cyberus-technology.de> On-behalf-of: SAP paul.kroeher@sap.com
1 parent e33f2c6 commit 7ba0647

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

modules/testing/default.nix

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,21 @@ let
3838
];
3939

4040
environment.variables = adminEnv;
41+
# pw: root
42+
users.users.root.hashedPassword = lib.mkForce "$y$j9T$HiT/m702z/73g4Dt5RzbW0$b3SaYI1FoyT/ORV/qFR/s9zonJBKDn4p2XKyYM2wp1.";
43+
users.users.root.hashedPasswordFile = null;
4144

4245
# enable easy access to test VMs with ssh
43-
users.users.root.openssh.authorizedKeys.keys = [
44-
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEMjGRp1/vaTxGiGbZnaSv4wu4LUUP7lGSGDFKfF31xw paul.kroeher@cyberus-technology.de"
45-
];
46+
# users.users.root.openssh.authorizedKeys.keys = [
47+
#
48+
# ];
4649

4750
services.openssh = {
4851
enable = true;
4952
ports = [ 22 ];
5053
settings = {
5154
PasswordAuthentication = true;
52-
PermitRootLogin = "without-password"; # "yes", "without-password", "prohibit-password", "forced-commands-only", "no"
55+
PermitRootLogin = "yes"; # "yes", "without-password", "prohibit-password", "forced-commands-only", "no"
5356
};
5457
};
5558

@@ -165,9 +168,9 @@ in
165168
166169
openstack image create --disk-format raw --container-format bare --public --file ${image_raw} cirros
167170
openstack flavor create --public m1.nano --id auto --ram 256 --disk 0 --vcpus 1
168-
openstack volume qos create --consumer "front-end" --property "total_iops_sec=20000" iops
169-
openstack volume qos associate iops __DEFAULT__
170-
openstack volume create --image cirros --size 1 --bootable vol
171+
# openstack volume qos create --consumer "front-end" --property "total_iops_sec=20000" iops
172+
# openstack volume qos associate iops __DEFAULT__
173+
# openstack volume create --image cirros --size 1 --bootable vol
171174
172175
openstack security group rule create --proto icmp default
173176
openstack security group rule create --proto tcp --dst-port 22 default

tests/openstack-default-setup.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ pkgs.nixosTest {
112112
controllerVM.wait_for_unit("nova-conductor.service")
113113
114114
# check all services on storageVM
115-
storageVM.wait_for_unit("tgtd.service")
115+
## tgtd is only used in LVM setup
116+
## storageVM.wait_for_unit("tgtd.service")
117+
storageVM.wait_for_unit("nfs-server.service")
116118
storageVM.wait_for_unit("cinder-volume.service")
117119
118120
assert wait_for_openstack()
@@ -140,7 +142,7 @@ pkgs.nixosTest {
140142
# attach volume to VM
141143
controllerVM.execute("openstack server add volume test_vm test_vol")
142144
# wait until volume is attached
143-
time.sleep(20)
145+
retry_until_succeed(controllerVM, "openstack volume show test_vol -f value -c status | grep 'in-use'", 20)
144146
145147
retry_until_succeed(controllerVM, f"ip netns exec {net_ns} sshpass -p gocubsgo ssh cirros@{vm_ip} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null lsblk", 60)
146148
# check second block device of VM

0 commit comments

Comments
 (0)