Feature: Fast test to quickly flag when something has broken.

Test results for features/misc/smoke-test.feature

Running behat features/misc/smoke-test.feature results in:

@smoke-test
Feature: Fast test to quickly flag when something has broken.
  In order to get quicker feedback on regressions
  As a Rugged developer
  I need to run a test that exercises core functionality quickly.

  Background:
    Given I run "make clean-fixtures"
    Given local Rugged directories exist
    Given I run "sudo openssl genpkey -algorithm ED25519 -out /var/rugged/tuf_repo/tmp/root_private.pem"
    And I run "sudo openssl pkey -in /var/rugged/tuf_repo/tmp/root_private.pem -pubout | sudo tee -a /var/rugged/tuf_repo/tmp/root_public.pem"
    And I run "sudo openssl genpkey -algorithm ED25519 -out /var/rugged/tuf_repo/tmp/root1_private.pem"
    And I run "sudo openssl pkey -in /var/rugged/tuf_repo/tmp/root1_private.pem -pubout | sudo tee -a /var/rugged/tuf_repo/tmp/root1_public.pem"
    And I run "sudo chown rugged:rugged /var/rugged/tuf_repo/tmp/*.pem"
    Given I run the Rugged command "rugged generate-keys --local --role=snapshot"
    And I run the Rugged command "rugged generate-keys --local --role=targets"
    And I run the Rugged command "rugged generate-keys --local --role=timestamp"
    Given I run the Rugged command "rugged initialize-partial-root-metadata"
    Given I run the Rugged command "rugged add-verification-key root /var/rugged/tuf_repo/tmp/root_public.pem --key-type=pem"
    And I run the Rugged command "rugged add-verification-key root /var/rugged/tuf_repo/tmp/root1_public.pem --key-type=pem"
    And I run the Rugged command "rugged add-verification-key snapshot /var/rugged/verification_keys/snapshot/snapshot.pub"
    And I run the Rugged command "rugged add-verification-key targets /var/rugged/verification_keys/targets/targets.pub"
    And I run the Rugged command "rugged add-verification-key timestamp /var/rugged/verification_keys/timestamp/timestamp.pub"
    Given I run the Rugged command "openssl pkeyutl -in /var/rugged/tuf_repo/partial/signable-1.root.json -rawin -sign -inkey /var/rugged/tuf_repo/tmp/root_private.pem | sudo sudo -u rugged tee -a /var/rugged/tuf_repo/tmp/root_signature.bin"
    And I run the Rugged command "openssl pkeyutl -in /var/rugged/tuf_repo/partial/signable-1.root.json -rawin -sign -inkey /var/rugged/tuf_repo/tmp/root1_private.pem | sudo sudo -u rugged tee -a /var/rugged/tuf_repo/tmp/root1_signature.bin"
    Given I run the Rugged command "rugged add-root-signature /var/rugged/tuf_repo/tmp/root_public.pem /var/rugged/tuf_repo/tmp/root_signature.bin --key-type=pem"
    And I run the Rugged command "rugged add-root-signature /var/rugged/tuf_repo/tmp/root1_public.pem /var/rugged/tuf_repo/tmp/root1_signature.bin --key-type=pem"
    Given I run the Rugged command "rugged --debug deploy-root-metadata"
    And I run "sudo cp features/fixtures/config/enable_hashed_bins.yaml /var/rugged/.config/rugged/config.yaml"
    And I run the Rugged command "rugged initialize --local"

  Scenario: Verify that metadata remains valid after adding a target.
    Given I am in the "/var/rugged/incoming_targets" directory
    And file "test0.txt" contains "test0"
    And I record a reference hash of "../tuf_repo/metadata/1.root.json"
    And I record a reference hash of "../tuf_repo/metadata/bin_2.json"
    And I record a reference hash of "../tuf_repo/metadata/bins.json"
    And I record a reference hash of "../tuf_repo/metadata/snapshot.json"
    And I record a reference hash of "../tuf_repo/metadata/targets.json"
    And I record a reference hash of "../tuf_repo/metadata/timestamp.json"
    When I run the Rugged command "rugged add-targets --local"
    Then file "../tuf_repo/metadata/1.root.json" has not changed
    And file "../tuf_repo/metadata/bin_2.json" has changed
    And file "../tuf_repo/metadata/bins.json" has not changed
    And file "../tuf_repo/metadata/targets.json" has not changed
    And file "../tuf_repo/metadata/snapshot.json" has changed
    And file "../tuf_repo/metadata/timestamp.json" has changed
    When I run the Rugged command "rugged validate metadata"
    Then I should get:
      """
      Metadata for the 'root' role is valid.
      Metadata for the 'timestamp' role is valid.
      Metadata for the 'snapshot' role is valid.
      Metadata for the 'targets' role is valid.
      """

1 scenario (1 passed)
40 steps (40 passed)
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Rugged TUF Server is a trademark of Consensus Enterprises.