shotgunsoftware / python-api

A Python-based library for accessing Flow Production Tracking API.
https://developer.shotgridsoftware.com/python-api
Other
306 stars 198 forks source link

SG-35018 Condition auth for Jenkins environment #350

Closed carlos-villavicencio-adsk closed 3 months ago

carlos-villavicencio-adsk commented 3 months ago

Checklist

Centralized authentication

Now all tests use the same authentication credentials. By default, it uses and expects a script name/key pair provided on the config file. However, a special flag SG_JENKINS is considered to use username/password only for SG sites that haven't created a script.

Improved test time

Before After
image image

Test durations

Argument durations was added to pytest to detect the slowest tests and improve them in the future

image

How to reproduce Jenkins environment locally:

Step 1: remove script_name/api_key from config file

Step 2: add human_login / human_password to config file

Step 3: run

export SG_JENKINS=1
pytest tests/test_api.py