mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 15:43:00 +00:00
nixos/code-server: init tests
This commit is contained in:
parent
2c95ebadf3
commit
371b4c3eb7
@ -170,6 +170,7 @@ in {
|
|||||||
cntr = handleTestOn ["aarch64-linux" "x86_64-linux"] ./cntr.nix {};
|
cntr = handleTestOn ["aarch64-linux" "x86_64-linux"] ./cntr.nix {};
|
||||||
cockpit = handleTest ./cockpit.nix {};
|
cockpit = handleTest ./cockpit.nix {};
|
||||||
cockroachdb = handleTestOn ["x86_64-linux"] ./cockroachdb.nix {};
|
cockroachdb = handleTestOn ["x86_64-linux"] ./cockroachdb.nix {};
|
||||||
|
code-server = handleTest ./code-server.nix {};
|
||||||
coder = handleTest ./coder.nix {};
|
coder = handleTest ./coder.nix {};
|
||||||
collectd = handleTest ./collectd.nix {};
|
collectd = handleTest ./collectd.nix {};
|
||||||
connman = handleTest ./connman.nix {};
|
connman = handleTest ./connman.nix {};
|
||||||
|
22
nixos/tests/code-server.nix
Normal file
22
nixos/tests/code-server.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import ./make-test-python.nix ({pkgs, lib, ...}:
|
||||||
|
{
|
||||||
|
name = "code-server";
|
||||||
|
|
||||||
|
nodes = {
|
||||||
|
machine = {pkgs, ...}: {
|
||||||
|
services.code-server = {
|
||||||
|
enable = true;
|
||||||
|
auth = "none";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
start_all()
|
||||||
|
machine.wait_for_unit("code-server.service")
|
||||||
|
machine.wait_for_open_port(4444)
|
||||||
|
machine.succeed("curl -k --fail http://localhost:4444", timeout=10)
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta.maintainers = [ lib.maintainers.drupol ];
|
||||||
|
})
|
@ -1,7 +1,7 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper
|
{ lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper
|
||||||
, cacert, moreutils, jq, git, rsync, pkg-config, yarn, python3
|
, cacert, moreutils, jq, git, rsync, pkg-config, yarn, python3
|
||||||
, esbuild, nodejs_16, node-gyp, libsecret, xorg, ripgrep
|
, esbuild, nodejs_16, node-gyp, libsecret, xorg, ripgrep
|
||||||
, AppKit, Cocoa, CoreServices, Security, cctools, xcbuild, quilt }:
|
, AppKit, Cocoa, CoreServices, Security, cctools, xcbuild, quilt, nixosTests }:
|
||||||
|
|
||||||
let
|
let
|
||||||
system = stdenv.hostPlatform.system;
|
system = stdenv.hostPlatform.system;
|
||||||
@ -243,6 +243,9 @@ in stdenv.mkDerivation rec {
|
|||||||
prefetchYarnCache = lib.overrideDerivation yarnCache (d: {
|
prefetchYarnCache = lib.overrideDerivation yarnCache (d: {
|
||||||
outputHash = lib.fakeSha256;
|
outputHash = lib.fakeSha256;
|
||||||
});
|
});
|
||||||
|
tests = {
|
||||||
|
inherit (nixosTests) code-server;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user