revert added tests
This reverts commit ffa918aec6.
It was merged incorrectly because I tricked the tests to succeed by accident.
This commit is contained in:
parent
56b937741a
commit
969630c22b
7 changed files with 17 additions and 41 deletions
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
|
|
@ -120,7 +120,7 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
echo "resultPath=$(nix eval .#checks.x86_64-linux.${{ matrix.check }} --raw)" >> $GITHUB_ENV
|
echo "resultPath=$(nix eval .#checks.x86_64-linux.${{ matrix.check }} --raw)" >> $GITHUB_ENV
|
||||||
nix build --print-build-logs --show-trace --keep-outputs --keep-failed .#checks.x86_64-linux.${{ matrix.check }} || find .
|
nix build --print-build-logs --show-trace --keep-outputs --keep-failed .#checks.x86_64-linux.${{ matrix.check }}
|
||||||
- name: Upload Build Result
|
- name: Upload Build Result
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
if: startsWith(matrix.check, 'vm_')
|
if: startsWith(matrix.check, 'vm_')
|
||||||
|
|
|
||||||
|
|
@ -1065,6 +1065,10 @@ in
|
||||||
];
|
];
|
||||||
in lib.mkIf (cfg.enable && cfg.apps.sso.enable) {
|
in lib.mkIf (cfg.enable && cfg.apps.sso.enable) {
|
||||||
assertions = [
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = cfg.apps.ldap.enable;
|
||||||
|
message = "SSO app requires LDAP app to work correctly.";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
assertion = cfg.ssl != null;
|
assertion = cfg.ssl != null;
|
||||||
message = "To integrate SSO, SSL must be enabled, set the shb.nextcloud.ssl option.";
|
message = "To integrate SSO, SSL must be enabled, set the shb.nextcloud.ssl option.";
|
||||||
|
|
@ -1124,7 +1128,6 @@ in
|
||||||
groups = "groups";
|
groups = "groups";
|
||||||
is_admin = "is_nextcloud_admin";
|
is_admin = "is_nextcloud_admin";
|
||||||
};
|
};
|
||||||
oidc_login_allowed_groups = [ cfg.apps.ldap.userGroup ];
|
|
||||||
oidc_login_default_group = "oidc";
|
oidc_login_default_group = "oidc";
|
||||||
oidc_login_use_external_storage = false;
|
oidc_login_use_external_storage = false;
|
||||||
oidc_login_scope = lib.concatStringsSep " " scopes;
|
oidc_login_scope = lib.concatStringsSep " " scopes;
|
||||||
|
|
|
||||||
|
|
@ -427,17 +427,16 @@ in
|
||||||
groups = [ "user_group" "admin_group" ];
|
groups = [ "user_group" "admin_group" ];
|
||||||
password.result.path = pkgs.writeText "bobPassword" "BobPassword";
|
password.result.path = pkgs.writeText "bobPassword" "BobPassword";
|
||||||
};
|
};
|
||||||
charlie = {
|
# charlie = {
|
||||||
email = "charlie@example.com";
|
# email = "charlie@example.com";
|
||||||
groups = [ "other_group" ];
|
# groups = [ ];
|
||||||
password.result.path = pkgs.writeText "charliePassword" "CharliePassword";
|
# password.result.path = pkgs.writeText "charliePassword" "CharliePassword";
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
ensureGroups = {
|
ensureGroups = {
|
||||||
user_group = {};
|
user_group = {};
|
||||||
admin_group = {};
|
admin_group = {};
|
||||||
other_group = {};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -247,12 +247,6 @@ in
|
||||||
"expect(page.get_by_role('button', name=re.compile('Sign In'))).not_to_be_visible()"
|
"expect(page.get_by_role('button', name=re.compile('Sign In'))).not_to_be_visible()"
|
||||||
"expect(page).to_have_title(re.compile('Dashboard'))"
|
"expect(page).to_have_title(re.compile('Dashboard'))"
|
||||||
]; }
|
]; }
|
||||||
{ username = "charlie"; password = "NotCharliePassword"; nextPageExpect = [
|
|
||||||
"expect(page.get_by_text('Username or password is incorrect.')).to_be_visible()"
|
|
||||||
]; }
|
|
||||||
{ username = "charlie"; password = "CharliePassword"; nextPageExpect = [
|
|
||||||
"expect(page.get_by_text('Username or password is incorrect.')).to_be_visible()"
|
|
||||||
]; }
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -231,13 +231,11 @@ let
|
||||||
{ username = "bob"; password = "NotBobPassword"; nextPageExpect = [
|
{ username = "bob"; password = "NotBobPassword"; nextPageExpect = [
|
||||||
"expect(page.get_by_text('Incorrect username or password')).to_be_visible()"
|
"expect(page.get_by_text('Incorrect username or password')).to_be_visible()"
|
||||||
]; }
|
]; }
|
||||||
{ username = "charlie"; password = "NotCharliePassword"; nextPageExpect = [
|
# TODO: charlie has no groups, which makes lldap return a 'null' value instead of an empty array and Authelia does not like that.
|
||||||
"expect(page.get_by_text('Incorrect username or password')).to_be_visible()"
|
# { username = "charlie"; password = "CharliePassword"; nextPageExpect = [
|
||||||
]; }
|
# "page.get_by_role('button', name=re.compile('Accept')).click()"
|
||||||
{ username = "charlie"; password = "CharliePassword"; nextPageExpect = [
|
# "expect(page).to_have_title(re.compile('Dashboard'))"
|
||||||
"page.get_by_role('button', name=re.compile('Accept')).click()"
|
# ]; }
|
||||||
"expect(page.get_by_text('not member of the allowed groups')).to_be_visible()"
|
|
||||||
]; }
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -271,9 +269,6 @@ let
|
||||||
sso = { config, ... }:
|
sso = { config, ... }:
|
||||||
{
|
{
|
||||||
shb.nextcloud = {
|
shb.nextcloud = {
|
||||||
apps.ldap = {
|
|
||||||
userGroup = "user_group";
|
|
||||||
};
|
|
||||||
apps.sso = {
|
apps.sso = {
|
||||||
enable = true;
|
enable = true;
|
||||||
endpoint = "https://${config.shb.authelia.subdomain}.${config.shb.authelia.domain}";
|
endpoint = "https://${config.shb.authelia.subdomain}.${config.shb.authelia.domain}";
|
||||||
|
|
@ -554,6 +549,7 @@ in
|
||||||
testLib.certs
|
testLib.certs
|
||||||
https
|
https
|
||||||
testLib.ldap
|
testLib.ldap
|
||||||
|
ldap
|
||||||
(testLib.sso config.shb.certs.certs.selfsigned.n)
|
(testLib.sso config.shb.certs.certs.selfsigned.n)
|
||||||
sso
|
sso
|
||||||
({ config, ... }: {
|
({ config, ... }: {
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ let
|
||||||
testLib.baseModule
|
testLib.baseModule
|
||||||
testLib.clientLoginModule
|
testLib.clientLoginModule
|
||||||
];
|
];
|
||||||
|
virtualisation.memorySize = 4096;
|
||||||
test = {
|
test = {
|
||||||
subdomain = "o";
|
subdomain = "o";
|
||||||
};
|
};
|
||||||
|
|
@ -93,13 +94,6 @@ let
|
||||||
"expect(page.get_by_role('button', name=re.compile('Sign In'))).not_to_be_visible()"
|
"expect(page.get_by_role('button', name=re.compile('Sign In'))).not_to_be_visible()"
|
||||||
"expect(page.get_by_text('logged in')).to_be_visible()"
|
"expect(page.get_by_text('logged in')).to_be_visible()"
|
||||||
]; }
|
]; }
|
||||||
{ username = "charlie"; password = "NotCharliePassword"; nextPageExpect = [
|
|
||||||
"expect(page.get_by_text(re.compile('[Ii]ncorrect'))).to_be_visible()"
|
|
||||||
]; }
|
|
||||||
{ username = "charlie"; password = "CharliePassword"; nextPageExpect = [
|
|
||||||
"page.get_by_role('button', name=re.compile('Accept')).click()"
|
|
||||||
"expect(page.get_by_text('pending activation')).to_be_visible()"
|
|
||||||
]; }
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -178,8 +172,6 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
clientLoginSso
|
clientLoginSso
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.memorySize = 4096;
|
|
||||||
};
|
};
|
||||||
nodes.server = { config, pkgs, ... }: {
|
nodes.server = { config, pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -191,8 +183,6 @@ in
|
||||||
(testLib.sso config.shb.certs.certs.selfsigned.n)
|
(testLib.sso config.shb.certs.certs.selfsigned.n)
|
||||||
sso
|
sso
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.memorySize = 4096;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = commonTestScript.access;
|
testScript = commonTestScript.access;
|
||||||
|
|
|
||||||
|
|
@ -115,12 +115,6 @@ let
|
||||||
"expect(page.get_by_role('button', name=re.compile('Sign In'))).not_to_be_visible()"
|
"expect(page.get_by_role('button', name=re.compile('Sign In'))).not_to_be_visible()"
|
||||||
"expect(page.get_by_text('Create a media profile')).to_be_visible()"
|
"expect(page.get_by_text('Create a media profile')).to_be_visible()"
|
||||||
]; }
|
]; }
|
||||||
{ username = "charlie"; password = "NotCharliePassword"; nextPageExpect = [
|
|
||||||
"expect(page.get_by_text(re.compile('[Ii]ncorrect'))).to_be_visible()"
|
|
||||||
]; }
|
|
||||||
{ username = "charlie"; password = "CharliePassword"; nextPageExpect = [
|
|
||||||
"expect(page).to_have_url(re.compile('.*/authenticated'))"
|
|
||||||
]; }
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue