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.
 | 
			
		||||
 | 
			
		||||
import ./make-test-python.nix (
 | 
			
		||||
  { pkgs, lib, ... }:
 | 
			
		||||
  { pkgs, lib, package ? pkgs.discourse, ... }:
 | 
			
		||||
  let
 | 
			
		||||
    certs = import ./common/acme/server/snakeoil-certs.nix;
 | 
			
		||||
    clientDomain = "client.fake.domain";
 | 
			
		||||
@ -55,7 +55,7 @@ import ./make-test-python.nix (
 | 
			
		||||
 | 
			
		||||
        services.discourse = {
 | 
			
		||||
          enable = true;
 | 
			
		||||
          inherit admin;
 | 
			
		||||
          inherit admin package;
 | 
			
		||||
          hostname = discourseDomain;
 | 
			
		||||
          sslCertificate = "${certs.${discourseDomain}.cert}";
 | 
			
		||||
          sslCertificateKey = "${certs.${discourseDomain}.key}";
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
{ stdenv, makeWrapper, runCommandNoCC, lib, nixosTests, writeShellScript
 | 
			
		||||
{ stdenv, pkgs, makeWrapper, runCommandNoCC, lib, writeShellScript
 | 
			
		||||
, fetchFromGitHub, bundlerEnv, callPackage
 | 
			
		||||
 | 
			
		||||
, ruby, replace, gzip, gnutar, git, cacert, util-linux, gawk
 | 
			
		||||
@ -6,7 +6,7 @@
 | 
			
		||||
, redis, postgresql, which, brotli, procps, rsync, nodePackages, v8
 | 
			
		||||
 | 
			
		||||
, plugins ? []
 | 
			
		||||
}:
 | 
			
		||||
}@args:
 | 
			
		||||
 | 
			
		||||
let
 | 
			
		||||
  version = "2.7.7";
 | 
			
		||||
@ -292,7 +292,7 @@ let
 | 
			
		||||
      enabledPlugins = plugins;
 | 
			
		||||
      plugins = callPackage ./plugins/all-plugins.nix { inherit mkDiscoursePlugin; };
 | 
			
		||||
      ruby = rubyEnv.wrappedRuby;
 | 
			
		||||
      tests = nixosTests.discourse;
 | 
			
		||||
      tests = import ../../../../nixos/tests/discourse.nix { package = pkgs.discourse.override args; };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
in discourse
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user