Skip to content

--write-outputs is unrecognized while running tests #251

@chimosky

Description

@chimosky

Problem Description
If you needed to update test snapshots, osprey provides the --write-outputs argument which is supposed to capture test output and update existing output with said output, but this doesn't happen as it seems the engine.conftest plugin - which creates the argument - isn't loaded before argument parsing for some reason, which leads to the argument being unrecognized.

To Reproduce
Steps to reproduce the behavior:

  1. Run ./run-tests.sh --write-outputs
  2. See error;
osprey on  main [$?] via  v3.14.4 
 ➜ ./[run-tests.sh](http://run-tests.sh/) --write-outputs
[+]  9/9t 9/99
 ✔ Container minio                               Healthy                                                                                                            11.1s
 ✔ Container bigtable                            Healthy                                                                                                            11.1s
 ✔ Container osprey-kafka                        Healthy                                                                                                            12.7s
 ✔ Container postgres                            Started                                                                                                             0.7s
 ✔ Container snowflake-id-worker                 Started                                                                                                             0.7s
 ✔ Container etcd                                Running                                                                                                             0.0s
 ✔ Container osprey-minio-bucket-init-1          Started                                                                                                            11.0s
 ✔ Container bigtable-initializer                Started                                                                                                            11.0s
 ✔ Container osprey-osprey-kafka-topic-creator-1 Started                                                                                                            12.5s
Container etcd Waiting 
Container minio Waiting 
Container bigtable osprey on  main [$?] via  v3.14.4 

 ➜ ./[run-tests.sh](http://run-tests.sh/) --write-outputs

[+]  9/9t 9/99

 ✔ Container minio                               Healthy                                                                                                            11.1s

 ✔ Container bigtable                            Healthy                                                                                                            11.1s

 ✔ Container osprey-kafka                        Healthy                                                                                                            12.7s

 ✔ Container postgres                            Started                                                                                                             0.7s

 ✔ Container snowflake-id-worker                 Started                                                                                                             0.7s

 ✔ Container etcd                                Running                                                                                                             0.0s

 ✔ Container osprey-minio-bucket-init-1          Started                                                                                                            11.0s

 ✔ Container bigtable-initializer                Started                                                                                                            11.0s

 ✔ Container osprey-osprey-kafka-topic-creator-1 Started                                                                                                            12.5s

Container etcd Waiting 

Container minio Waiting 

Container bigtable Waiting 

Container osprey-kafka Waiting 

Container postgres Waiting 

Container bigtable-initializer Waiting 

Container osprey-minio-bucket-init-1 Waiting 

Container osprey-osprey-kafka-topic-creator-1 Waiting 

Container osprey-minio-bucket-init-1 Exited 

Container minio Healthy 

Container postgres Healthy 

Container etcd Healthy 

Container bigtable Healthy 

Container osprey-kafka Healthy 

Container bigtable-initializer Exited 

Container osprey-osprey-kafka-topic-creator-1 Exited 

Container osprey-test_runner-run-083dab0d9a4a Creating 

Container osprey-test_runner-run-083dab0d9a4a Created 

      Built example-plugins @ file:///osprey/example_plugins

      Built osprey-rpc @ file:///osprey/osprey_rpc

      Built osprey-worker @ file:///osprey/osprey_worker

Uninstalled 3 packages in 2ms

Installed 3 packages in 2ms

ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]

pytest: error: unrecognized arguments: --write-outputs

  inifile: /osprey/pyproject.toml

  rootdir: /ospreyWaiting 
Container osprey-kafka Waiting 
Container postgres Waiting 
Container bigtable-initializer Waiting 
Container osprey-minio-bucket-init-1 Waiting 
Container osprey-osprey-kafka-topic-creator-1 Waiting 
Container osprey-minio-bucket-init-1 Exited 
Container minio Healthy 
Container postgres Healthy 
Container etcd Healthy 
Container bigtable Healthy 
Container osprey-kafka Healthy 
Container bigtable-initializer Exited 
Container osprey-osprey-kafka-topic-creator-1 Exited 
Container osprey-test_runner-run-083dab0d9a4a Creating 
Container osprey-test_runner-run-083dab0d9a4a Created 
      Built example-plugins @ file:///osprey/example_plugins
      Built osprey-rpc @ file:///osprey/osprey_rpc
      Built osprey-worker @ file:///osprey/osprey_worker
Uninstalled 3 packages in 2ms
Installed 3 packages in 2ms
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --write-outputs
  inifile: /osprey/pyproject.toml
  rootdir: /osprey

Expected behavior
Running with the argument should write checked validator outputs instead of checking them.

Screenshots/Recordings/Logs
If applicable, add screenshots to help explain your problem.

Context/Environment (please complete the following information):

  • OS: Fedora Linux - v43.
  • Browser: NIL.
  • Version: NIL

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Priority

    None yet

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions