features/composer/tuf-composer.featureRunning behat features/composer/tuf-composer.feature results in:
@composer-plugin @php-tuf @satis
Feature: The TUF Composer plugin works with Satis repositories.
In order to securely build PHP codebases
As a site builder
I need Composer to install and use the TUF Composer plugin.
Background:
Given I run "make reset-satis"
And I am in the "satis" directory
And I run "bin/satis build"
And I am in the "../d9-site" directory
And I use the "tuf-satis-composer.json" Composer file
Scenario: Composer TUF plugin is installed.
Given I run "ln -sf tuf-composer.json composer.json"
Given I use the "tuf-composer.json" Composer file
And I run "rm -rf vendor/php-tuf"
And the file "composer.json" contains:
"""
"url": "https://github.com/php-tuf/composer-integration"
"url": "https://github.com/php-tuf/php-tuf"
"php-tuf/composer-integration": "^1"
"""
When I run "composer install"
Then I should not get:
"""
Exit Code: 1(General error)
Root composer.json requires php-tuf/composer-integration, it could not be found in any version, there may be a typo in the package name.
require php-tuf/php-tuf dev-main -> could not be found in any version, there may be a typo in the package name.
Exit Code: 255(Unknown error)
Could not authenticate against github.com
Exit Code: 2(Misuse of shell builtins)
require php-tuf/php-tuf dev-main -> found php-tuf/php-tuf[dev-main] but it does not match your minimum-stability.
Authenticity of packages from http://packages.ddev.site are not verified by TUF.
"""
'Could not authenticate against github.com' was found in command output:
------
Scaffolding files for drupal/core:
- Copy [web-root]/.htaccess from assets/scaffold/files/htaccess
- Copy [web-root]/README.md from assets/scaffold/files/drupal.README.md
- Copy [web-root]/index.php from assets/scaffold/files/index.php
- Copy [web-root]/.csslintrc from assets/scaffold/files/csslintrc
- Copy [web-root]/robots.txt from assets/scaffold/files/robots.txt
- Copy [web-root]/update.php from assets/scaffold/files/update.php
- Copy [web-root]/web.config from assets/scaffold/files/web.config
- Copy [web-root]/INSTALL.txt from assets/scaffold/files/drupal.INSTALL.txt
- Copy [web-root]/.eslintignore from assets/scaffold/files/eslintignore
- Copy [web-root]/.eslintrc.json from assets/scaffold/files/eslintrc.json
- Copy [web-root]/.ht.router.php from assets/scaffold/files/ht.router.php
- Copy [web-root]/sites/README.txt from assets/scaffold/files/sites.README.txt
- Copy [web-root]/example.gitignore from assets/scaffold/files/example.gitignore
- Copy [web-root]/themes/README.txt from assets/scaffold/files/themes.README.txt
- Copy [web-root]/modules/README.txt from assets/scaffold/files/modules.README.txt
- Copy [web-root]/profiles/README.txt from assets/scaffold/files/profiles.README.txt
- Copy [web-root]/sites/example.sites.php from assets/scaffold/files/example.sites.php
- Copy [web-root]/sites/development.services.yml from assets/scaffold/files/development.services.yml
- Copy [web-root]/sites/example.settings.local.php from assets/scaffold/files/example.settings.local.php
- Copy [web-root]/sites/default/default.services.yml from assets/scaffold/files/default.services.yml
- Copy [web-root]/sites/default/default.settings.php from assets/scaffold/files/default.settings.php
------
(RuntimeException)
Then I should get:
"""
Installing php-tuf/composer-integration
Authenticity of packages from https://repo.packagist.org are not verified by TUF.
"""
Scenario: Composer w/ TUF plugin can access a Satis repo.
Given the file "composer.json" contains:
"""
"url": "http://packages.ddev.site"
"""
When I run "composer config --list | grep repositories"
Then I should get:
"""
http://packages.ddev.site
"""
Scenario: Composer w/ TUF plugin can install a package from a Satis repo.
When I run "composer install"
Then I should get:
"""
- Locking drupal/token (1.11.0)
Installing drupal/token (1.11.0): Extracting archive
Authenticity of packages from http://packages.ddev.site are not verified by TUF.
"""
And the following files should exist:
"""
web/modules/contrib/token/token.info.yml
"""
--- Failed scenarios:
features/composer/tuf-composer.feature:14
3 scenarios (2 passed, 1 failed)
28 steps (26 passed, 1 failed, 1 skipped)