Skip to content

Commit fd31d57

Browse files
committed
Run only failing sso-on-2fa test
1 parent 0125b5b commit fd31d57

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/workflows/test-integration.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ jobs:
2626
- name: Run CI tests
2727
run: |
2828
cd ci/docker && docker compose exec -T gateway bash -c '
29-
ls -lah /var/www/html/var/cache && \
30-
ls -lah /var/www/html/var/cache/smoketest && \
3129
composer check
3230
'
3331

src/Surfnet/StepupGateway/GatewayBundle/Entity/InstitutionConfiguration.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,17 @@ class InstitutionConfiguration
3939
*/
4040
public $ssoOn2faEnabled;
4141

42-
private function __construct(string $institution, bool $ssoOn2faEnabled)
42+
/**
43+
* * @ORM\Column(type="boolean")
44+
*
45+
* @var bool is the SSO registration bypass feature enabled?
46+
*/
47+
public bool $ssoRegistrationBypass;
48+
49+
private function __construct(string $institution, bool $ssoOn2faEnabled, bool $ssoRegistrationBypass)
4350
{
4451
$this->institution = $institution;
4552
$this->ssoOn2faEnabled = $ssoOn2faEnabled;
53+
$this->ssoRegistrationBypass = $ssoRegistrationBypass;
4654
}
4755
}

tests/src/Repository/InstitutionConfigurationRepository.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ public function configure(string $institution, string $option, bool $value)
4848
$data = [
4949
'institution' => $institution,
5050
'sso_on2fa_enabled' => $value,
51+
'sso_registration_bypass' => $value,
5152
];
5253
$sql = <<<SQL
53-
INSERT INTO institution_configuration (institution, sso_on2fa_enabled)
54-
VALUES (:institution, :sso_on2fa_enabled);
54+
INSERT INTO institution_configuration (institution, sso_on2fa_enabled, sso_registration_bypass)
55+
VALUES (:institution, :sso_on2fa_enabled, :sso_registration_bypass);
5556
SQL;
5657
$stmt = $this->connection->prepare($sql);
5758
if ($stmt->execute($data)) {
@@ -70,8 +71,8 @@ public function configure(string $institution, string $option, bool $value)
7071
'value' => $value,
7172
];
7273
$sql = <<<SQL
73-
update gateway.institution_configuration
74-
set sso_on2fa_enabled = :value
74+
update institution_configuration
75+
set `$option` = :value
7576
where institution = :institution
7677
;
7778
SQL;

0 commit comments

Comments
 (0)