mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
freetube: add test
This change fixes ofborg eval error
This commit is contained in:
parent
26d50f9860
commit
4eeff46bbb
@ -306,6 +306,7 @@ in {
|
|||||||
forgejo = handleTest ./forgejo.nix { };
|
forgejo = handleTest ./forgejo.nix { };
|
||||||
freenet = handleTest ./freenet.nix {};
|
freenet = handleTest ./freenet.nix {};
|
||||||
freeswitch = handleTest ./freeswitch.nix {};
|
freeswitch = handleTest ./freeswitch.nix {};
|
||||||
|
freetube = discoverTests (import ./freetube.nix);
|
||||||
freshrss-sqlite = handleTest ./freshrss-sqlite.nix {};
|
freshrss-sqlite = handleTest ./freshrss-sqlite.nix {};
|
||||||
freshrss-pgsql = handleTest ./freshrss-pgsql.nix {};
|
freshrss-pgsql = handleTest ./freshrss-pgsql.nix {};
|
||||||
frigate = handleTest ./frigate.nix {};
|
frigate = handleTest ./frigate.nix {};
|
||||||
|
41
nixos/tests/freetube.nix
Normal file
41
nixos/tests/freetube.nix
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
let
|
||||||
|
tests = {
|
||||||
|
wayland = { pkgs, ... }: {
|
||||||
|
imports = [ ./common/wayland-cage.nix ];
|
||||||
|
services.cage.program = "${pkgs.freetube}/bin/freetube";
|
||||||
|
virtualisation.memorySize = 2047;
|
||||||
|
environment.variables.NIXOS_OZONE_WL = "1";
|
||||||
|
environment.variables.DISPLAY = "do not use";
|
||||||
|
};
|
||||||
|
xorg = { pkgs, ... }: {
|
||||||
|
imports = [ ./common/user-account.nix ./common/x11.nix ];
|
||||||
|
virtualisation.memorySize = 2047;
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.xserver.displayManager.sessionCommands = ''
|
||||||
|
${pkgs.freetube}/bin/freetube
|
||||||
|
'';
|
||||||
|
test-support.displayManager.auto.user = "alice";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mkTest = name: machine:
|
||||||
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
|
inherit name;
|
||||||
|
nodes = { "${name}" = machine; };
|
||||||
|
meta.maintainers = with pkgs.lib.maintainers; [ kirillrdy ];
|
||||||
|
enableOCR = true;
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
start_all()
|
||||||
|
machine.wait_for_unit('graphical.target')
|
||||||
|
machine.wait_for_text('Your Subscription list is currently empty')
|
||||||
|
machine.send_key("ctrl-r")
|
||||||
|
machine.wait_for_text('Your Subscription list is currently empty')
|
||||||
|
machine.screenshot("main.png")
|
||||||
|
machine.send_key("ctrl-comma")
|
||||||
|
machine.wait_for_text('General Settings', timeout=30)
|
||||||
|
machine.screenshot("preferences.png")
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
in
|
||||||
|
builtins.mapAttrs (k: v: mkTest k v { }) tests
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, lib, fetchurl, appimageTools, makeWrapper, electron }:
|
{ stdenv, lib, fetchurl, appimageTools, makeWrapper, electron, nixosTests }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "freetube";
|
pname = "freetube";
|
||||||
@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "add96ad3509d4d5c6d8658b005dfd046963cd6bb0a4e1f3e88f726a86c05810f";
|
sha256 = "add96ad3509d4d5c6d8658b005dfd046963cd6bb0a4e1f3e88f726a86c05810f";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
passthru.tests = nixosTests.freetube;
|
||||||
|
|
||||||
appimageContents = appimageTools.extractType2 {
|
appimageContents = appimageTools.extractType2 {
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
inherit src;
|
inherit src;
|
||||||
|
Loading…
Reference in New Issue
Block a user