-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sync tests when using a token #620
Conversation
* Also adds method to link a device using the pin
Fix sync tests
Codecov Report
@@ Coverage Diff @@
## master #620 +/- ##
==========================================
- Coverage 65.86% 65.58% -0.29%
==========================================
Files 20 20
Lines 4137 4161 +24
==========================================
+ Hits 2725 2729 +4
- Misses 1412 1432 +20
Continue to review full report at Codecov.
|
2b42bed
to
ac549bb
Compare
Thanks! Should the test run a claimed server or am it missing something? |
Yes, a claimed server with an account that also has a valid Plex Pass. |
Description
Sync tests could fail because of conflicting parallel CI tests using the same token. When a token is created it is associated with a specific
X-Plex-Client-Identifier
. Using the token with differentX-Plex-
headers will update the device attributes athttps://plex.tv/devices.xml
except for theclientIdentifier
. This causes issues because one CI could be running main tests which sets the headerX-Plex-Provides=controller
while another parallel CI running sync test sets the headerX-Plex-Provides=sync-target
. Depending on which API requests are being made at the time the sync tests could fail because it will suddenly be missingsync-target
for the device.This PR:
MyPlexPinLogin
to usehttps://plex.tv/api/v2
endpoint.createMyPlexDevice
that usesMyPlexPinLogin
to create a new device on the Plex account.clientIdentifier
. This gives the sync tests it's own sync device which won't conflict with the device associated with the token.See workflow run here: https://github.com/JonnyWong16/python-plexapi/actions/runs/404885213
Type of change
Please delete options that are not relevant.
Checklist: