mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixosTests.openvscode-server: init
This commit is contained in:
parent
1d37fe1526
commit
cce7cdd293
@ -554,6 +554,7 @@ in {
|
|||||||
opentabletdriver = handleTest ./opentabletdriver.nix {};
|
opentabletdriver = handleTest ./opentabletdriver.nix {};
|
||||||
owncast = handleTest ./owncast.nix {};
|
owncast = handleTest ./owncast.nix {};
|
||||||
image-contents = handleTest ./image-contents.nix {};
|
image-contents = handleTest ./image-contents.nix {};
|
||||||
|
openvscode-server = handleTest ./openvscode-server.nix {};
|
||||||
orangefs = handleTest ./orangefs.nix {};
|
orangefs = handleTest ./orangefs.nix {};
|
||||||
os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {};
|
os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {};
|
||||||
osrm-backend = handleTest ./osrm-backend.nix {};
|
osrm-backend = handleTest ./osrm-backend.nix {};
|
||||||
|
22
nixos/tests/openvscode-server.nix
Normal file
22
nixos/tests/openvscode-server.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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 ];
|
||||||
|
})
|
@ -1,7 +1,7 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper
|
{ lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper
|
||||||
, cacert, moreutils, jq, git, pkg-config, yarn, python3
|
, cacert, moreutils, jq, git, pkg-config, yarn, python3
|
||||||
, esbuild, nodejs_16, libsecret, xorg, ripgrep
|
, esbuild, nodejs_16, libsecret, xorg, ripgrep
|
||||||
, AppKit, Cocoa, Security, cctools }:
|
, AppKit, Cocoa, Security, cctools, nixosTests }:
|
||||||
|
|
||||||
let
|
let
|
||||||
system = stdenv.hostPlatform.system;
|
system = stdenv.hostPlatform.system;
|
||||||
@ -164,6 +164,10 @@ in stdenv.mkDerivation rec {
|
|||||||
ln -s ${nodejs}/bin/node $out
|
ln -s ${nodejs}/bin/node $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
inherit (nixosTests) openvscode-server;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Run VS Code on a remote machine";
|
description = "Run VS Code on a remote machine";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user