Skip to content

Commit 24df6fc

Browse files
committed
Clean up and documentation
1 parent 5fc0468 commit 24df6fc

File tree

3 files changed

+21
-116
lines changed

3 files changed

+21
-116
lines changed

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Key types and providers for OS2Web built on the [Key module](https://www.drupal.org/project/key).
44

55
The OS2Web key module provides two _key types_, [Certificate](#certificate) and [OpenID Connect
6-
(OIDC)](#openid-connect-oidc). Two _key providers_, [Azure Key Vault](#azure-key-vault) and [Infisical](#infisical), are
6+
(OIDC)](#openid-connect-oidc). Two _key providers_, [Azure Key Vault](#azure-key-vault) and [HashiCorp Vault](#hashiCorp-vault), are
77
planned, but not yet implemented.
88

99
See [the Key Developer Guide](https://www.drupal.org/docs/contributed-modules/key/developer-guide) for details in how to
@@ -106,13 +106,16 @@ $key = $repository->getKey('openid_connect_ad');
106106

107107
## Providers
108108

109+
The module comes with two key providers.
110+
109111
### Azure Key Vault
110112

111-
`@todo` <https://azure.microsoft.com/en-us/products/key-vault>
113+
Used for fetching certificate from Azure Key vault.
112114

113-
### Infisical
115+
### HashiCorp Vault
114116

115-
`@todo` <https://infisical.com/>
117+
Used to fetch any sort of secret string from HashiCorp vault. Note that
118+
this can only provide string values, i.e. no binary files.
116119

117120
## Coding standards
118121

@@ -146,3 +149,17 @@ analysis:
146149
```shell
147150
docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.3-fpm ./scripts/code-analysis
148151
```
152+
153+
## Unit tests
154+
155+
We use [PHPUnit](https://phpunit.de/documentation.html) for unit testing.
156+
157+
Testing mostly centers around the conversion and parsing of certificates. For this purpose a bunch of test
158+
certificates has been generated.
159+
160+
Running PHPUnit tests in a standalone Drupal module is a bit tricky, so we use a helper script to run the
161+
analysis:
162+
163+
```shell
164+
docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.3-fpm ./scripts/unit-tests
165+
```

composer.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@
4747
"sort-packages": true
4848
},
4949
"scripts": {
50-
"code-analysis": [
51-
"@code-analysis/drupal-check"
52-
],
53-
"code-analysis/drupal-check": [
54-
"# @see https://github.com/mglaman/drupal-check/issues/261#issuecomment-1030141772 for details on exclude-dir value",
55-
"drupal-check --deprecations --analysis --exclude-dir='vendor' *.* src"
56-
],
5750
"coding-standards-apply": [
5851
"@coding-standards-apply/phpcs"
5952
],

phpunit.xml

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)