0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

Merge remote-tracking branch 'origin/master' into staging-next

This commit is contained in:
Fabián Heredia Montiel 2023-10-08 00:18:22 -06:00
commit 7f16b623fc
115 changed files with 1202 additions and 522 deletions

View file

@ -35,9 +35,11 @@ let
enable = true;
database = { inherit type; };
package = giteaPackage;
metricsTokenFile = (pkgs.writeText "metrics_secret" "fakesecret").outPath;
settings.service.DISABLE_REGISTRATION = true;
settings."repository.signing".SIGNING_KEY = signingPrivateKeyId;
settings.actions.ENABLED = true;
settings.metrics.ENABLED = true;
};
environment.systemPackages = [ giteaPackage pkgs.gnupg pkgs.jq ];
services.openssh.enable = true;
@ -143,6 +145,12 @@ let
+ '-H "Accept: application/json" | jq length)" = "1"'
)
with subtest("Testing metrics endpoint"):
server.succeed('curl '
+ '-H "Authorization: Bearer fakesecret" '
+ 'http://localhost:3000/metrics '
+ '| grep gitea_accesses')
with subtest("Testing runner registration"):
server.succeed(
"su -l gitea -c 'GITEA_WORK_DIR=/var/lib/gitea gitea actions generate-runner-token' | sed 's/^/TOKEN=/' | tee /var/lib/gitea/runner_token"

View file

@ -32,14 +32,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
xauthority = "/run/user/${uid}/gdm/Xauthority";
in ''
with subtest("Login to GNOME Flashback with GDM"):
# wait_for_x() checks graphical-session.target, which is expected to be
# inactive on gnome-flashback before #228946 (i.e. systemd managed
# gnome-session) is done.
# https://github.com/NixOS/nixpkgs/pull/208060
#
# Previously this was unconditionally touched by xsessionWrapper but was
# changed in #233981 (we have GNOME-Flashback:GNOME in XDG_CURRENT_DESKTOP).
# machine.wait_for_x()
machine.wait_for_x()
machine.wait_until_succeeds('journalctl -t gnome-session-binary --grep "Entering running state"')
# Wait for alice to be logged in"
machine.wait_for_unit("default.target", "${user.name}")

View file

@ -26,13 +26,13 @@ let
'';
mkKeyboardTest = name: { settings, test }: with pkgs.lib; makeTest {
mkKeyboardTest = name: { default, test }: with pkgs.lib; makeTest {
inherit name;
nodes.machine = {
services.keyd = {
enable = true;
keyboards.default = { inherit settings; };
keyboards = { inherit default; };
};
};
@ -70,13 +70,20 @@ let
in
pkgs.lib.mapAttrs mkKeyboardTest {
swap-ab_and_ctrl-as-shift = {
test.press = [ "a" "ctrl-b" "c" ];
test.expect = [ "b" "A" "c" ];
test.press = [ "a" "ctrl-b" "c" "alt_r-h" ];
test.expect = [ "b" "A" "c" "q" ];
settings.main = {
"a" = "b";
"b" = "a";
"control" = "oneshot(shift)";
default = {
settings.main = {
"a" = "b";
"b" = "a";
"control" = "oneshot(shift)";
"rightalt" = "layer(rightalt)";
};
extraConfig = ''
[rightalt:G]
h = q
'';
};
};
}