cablelabs / lpwanserver

LPWAN Provisioning & Management Server
https://lpwanserver.com
Apache License 2.0
37 stars 11 forks source link

Delete TTN applications created in e2e-tests #205

Closed rhythnic closed 5 years ago

rhythnic commented 5 years ago

Add API calls to delete the applications created on TTN during e2e tests.

rhythnic commented 5 years ago

Update: In development I accidently deleted an application on @dschrimpsher 's TTN account which is needed for testing. Deleting that application might be the cause of, or related to, a new error that happens on lpwanserver e2e tests. The new error is a permissions error when attempting to add a device to an application on TTN.

rhythnic commented 5 years ago

Blocker: device error referenced in previous comment. #207

rhythnic commented 5 years ago

Deleting TTN applications from the console likely involves more API calls than just the one to delete the application from the account server. Putting issue on hold until correct sequence of API calls can be determined, or until TTN is run locally. For now, will continue to clean up in TTN console manually after tests run.

rhythnic commented 5 years ago

I checked the network tab when deleting an application on the TTN console, and it's only one API call, except that it's made to console.thethingsnetwork.org. In the implementation that causes the devEUI problems, the call was made to account.thethingsnetwork.org. Deleting applications in the e2e tests will most likely work if we use the console API.

rhythnic commented 5 years ago

Getting a 405 error when trying to call the console's delete application API. I think it will only allow use of that endpoint from the TTN UI. Deleting applications on the console is part of the front-end's e2e tests. Going to attempt to isolate that in a script that can be called from this repo's travis config.

rhythnic commented 5 years ago

Revisit, except use account API to delete devices before deleting applications.

rhythnic commented 5 years ago

Completed in #287