ansibleplaybookbundle / ansible-playbook-bundle

THIS REPO IS MIGRATING: https://github.com/automationbroker/apb
GNU General Public License v2.0
140 stars 70 forks source link

add Bearer string in the request #284

Closed jianzhangbjz closed 6 years ago

jianzhangbjz commented 6 years ago

PR #258 lack of the Bearer string in the Authorization headers. Before this PR:

[root@localhost config]# oc whoami -t
y3RNSUB4vQv9ANeAokn8BVDi5BRZikoJ99-z7sWmlxI
[root@localhost config]# apb --token y3RNSUB4vQv9ANeAokn8BVDi5BRZikoJ99-z7sWmlxI list
Contacting the ansible-service-broker at: https://asb-1338-openshift-ansible-service-broker.apps.0507-azb.qe.rhcloud.com/ansible-service-broker/v2/catalog
Error: Attempt to list APBs in the broker returned status: 403
Unable to list APBs in Ansible Service Broker.

After this PR:

[root@localhost hello-world-apb]# apb --token y3RNSUB4vQv9ANeAokn8BVDi5BRZikoJ99-z7sWmlxI list
Contacting the ansible-service-broker at: https://asb-1338-openshift-ansible-service-broker.apps.0507-azb.qe.rhcloud.com/ansible-service-broker/v2/catalog
ID                                NAME               DESCRIPTION                        
2c259ddd8059b9bc65081e07bf20058f  rh-mariadb-apb     Mariadb apb implementation         
03b69500305d9859bb9440d9f9023784  rh-mediawiki-apb   Mediawiki apb implementation       
73ead67495322cc462794387fa9884f5  rh-mysql-apb       Software Collections MySQL APB     
d5915e05b253df421efe6e41fb6a66ba  rh-postgresql-apb  SCL PostgreSQL apb implementation  
djzager commented 6 years ago

@dymurray

jianzhangbjz commented 6 years ago

@djzager @dymurray Thanks! But, I found there is no an e2e test before merging the PR, so do we have a plan to add it? I think e2e testing before merging PR is very very important since it can find some basic errors. Otherwise, it will waste a lot of time for us to test/debug it. Or am I missing something? Please let me know If we have a plan to add e2e test, and maybe I can give a help if you need. :)

djzager commented 6 years ago

There are no e2e tests in this project at this time and, while I believe it would be an awesome contribution, I don't want to see your efforts undone by us moving towards:

  1. ansible-galaxy init --type=apb for creating APB roles
  2. A golang based tool for discovering|running APBs ( see: https://github.com/ansibleplaybookbundle/ansible-playbook-bundle/pull/279 ).

My recommendation would be to wait for the next iteration of the APB tool and ensure we add e2e tests to that.

jianzhangbjz commented 6 years ago

@djzager That's great! Thank you so much!