nixosTests.openvscode-server: init

Changed files
+28 -1
nixos
pkgs
servers
openvscode-server
+1
nixos/tests/all-tests.nix
···
opentabletdriver = handleTest ./opentabletdriver.nix {};
owncast = handleTest ./owncast.nix {};
image-contents = handleTest ./image-contents.nix {};
+
openvscode-server = handleTest ./openvscode-server.nix {};
orangefs = handleTest ./orangefs.nix {};
os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {};
osrm-backend = handleTest ./osrm-backend.nix {};
+22
nixos/tests/openvscode-server.nix
···
+
import ./make-test-python.nix ({pkgs, lib, ...}:
+
{
+
name = "openvscode-server";
+
+
nodes = {
+
machine = {pkgs, ...}: {
+
services.openvscode-server = {
+
enable = true;
+
withoutConnectionToken = true;
+
};
+
};
+
};
+
+
testScript = ''
+
start_all()
+
machine.wait_for_unit("openvscode-server.service")
+
machine.wait_for_open_port(3000)
+
machine.succeed("curl -k --fail http://localhost:3000", timeout=10)
+
'';
+
+
meta.maintainers = [ lib.maintainers.drupol ];
+
})
+5 -1
pkgs/servers/openvscode-server/default.nix
···
{ lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper
, cacert, moreutils, jq, git, pkg-config, yarn, python3
, esbuild, nodejs_16, libsecret, xorg, ripgrep
-
, AppKit, Cocoa, Security, cctools }:
+
, AppKit, Cocoa, Security, cctools, nixosTests }:
let
system = stdenv.hostPlatform.system;
···
cp -R -T ../vscode-reh-web-${vsBuildTarget} $out
ln -s ${nodejs}/bin/node $out
'';
+
+
passthru.tests = {
+
inherit (nixosTests) openvscode-server;
+
};
meta = with lib; {
description = "Run VS Code on a remote machine";