discourse.tests: Test the appropriate discourse package
Perform the tests on the package that the `tests` attribute is a child of, i.e. if `discourseAllPlugins.tests` is built, the tests will run with the `discourseAllPlugins` package, not the `discourse` package as previously. (cherry picked from commit 6fd5a40ccaf0b4da1362803a387bf46d381dd66a)
This commit is contained in:
parent
639e1d9639
commit
080e4e43fb
|
@ -4,7 +4,7 @@
|
||||||
# 3. replying to that message via email.
|
# 3. replying to that message via email.
|
||||||
|
|
||||||
import ./make-test-python.nix (
|
import ./make-test-python.nix (
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, package ? pkgs.discourse, ... }:
|
||||||
let
|
let
|
||||||
certs = import ./common/acme/server/snakeoil-certs.nix;
|
certs = import ./common/acme/server/snakeoil-certs.nix;
|
||||||
clientDomain = "client.fake.domain";
|
clientDomain = "client.fake.domain";
|
||||||
|
@ -55,7 +55,7 @@ import ./make-test-python.nix (
|
||||||
|
|
||||||
services.discourse = {
|
services.discourse = {
|
||||||
enable = true;
|
enable = true;
|
||||||
inherit admin;
|
inherit admin package;
|
||||||
hostname = discourseDomain;
|
hostname = discourseDomain;
|
||||||
sslCertificate = "${certs.${discourseDomain}.cert}";
|
sslCertificate = "${certs.${discourseDomain}.cert}";
|
||||||
sslCertificateKey = "${certs.${discourseDomain}.key}";
|
sslCertificateKey = "${certs.${discourseDomain}.key}";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, makeWrapper, runCommandNoCC, lib, nixosTests, writeShellScript
|
{ stdenv, pkgs, makeWrapper, runCommandNoCC, lib, writeShellScript
|
||||||
, fetchFromGitHub, bundlerEnv, callPackage
|
, fetchFromGitHub, bundlerEnv, callPackage
|
||||||
|
|
||||||
, ruby, replace, gzip, gnutar, git, cacert, util-linux, gawk
|
, ruby, replace, gzip, gnutar, git, cacert, util-linux, gawk
|
||||||
|
@ -6,7 +6,7 @@
|
||||||
, redis, postgresql, which, brotli, procps, rsync, nodePackages, v8
|
, redis, postgresql, which, brotli, procps, rsync, nodePackages, v8
|
||||||
|
|
||||||
, plugins ? []
|
, plugins ? []
|
||||||
}:
|
}@args:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "2.7.7";
|
version = "2.7.7";
|
||||||
|
@ -292,7 +292,7 @@ let
|
||||||
enabledPlugins = plugins;
|
enabledPlugins = plugins;
|
||||||
plugins = callPackage ./plugins/all-plugins.nix { inherit mkDiscoursePlugin; };
|
plugins = callPackage ./plugins/all-plugins.nix { inherit mkDiscoursePlugin; };
|
||||||
ruby = rubyEnv.wrappedRuby;
|
ruby = rubyEnv.wrappedRuby;
|
||||||
tests = nixosTests.discourse;
|
tests = import ../../../../nixos/tests/discourse.nix { package = pkgs.discourse.override args; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in discourse
|
in discourse
|
||||||
|
|
Loading…
Reference in New Issue