Skip to content

Commit

Permalink
Add test password to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
NotChristianGarcia committed Jan 3, 2024
1 parent 76eb05e commit 670a237
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export SERVICE_NAME := pods
# SERVICE_PASS to use throughout. Must be filled.
export SERVICE_PASS := password

# TEST_ABACO_SERVICE_PASSWORD to use throughout. Must be filled for testing (it has ability to create tokens)
export TEST_ABACO_SERVICE_PASS := changeme

# STATIC_NFS_IP to use throughout. Must be filled.
export STATIC_NFS_IP := 10.96.175.175

Expand Down Expand Up @@ -85,6 +88,7 @@ up: vars build
@sed -i 's/"version".*/"version": "$(TAG)",/g' config.json
@sed -i 's/MAKEFILE_SERVICE_NAME/$(SERVICE_NAME)/g' *
@sed -i 's/MAKEFILE_SERVICE_PASS/$(SERVICE_PASS)/g' *
@sed -i 's/MAKEFILE_TEST_ABACO_SERVICE_PASS/$(TEST_ABACO_SERVICE_PASS)/g' *
@sed -i 's/MAKEFILE_STATIC_NFS_IP/$(STATIC_NFS_IP)/g' *
@sed -i 's/MAKEFILE_TAG/$(TAG)/g' *
@echo " 🔥 : Running burnup."
Expand Down
5 changes: 5 additions & 0 deletions deploymentTemplate/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ spec:
secretKeyRef:
name: tapis-MAKEFILE_SERVICE_NAME-secrets
key: service-password
- name: TEST_ABACO_SERVICE_PASSWORD
valueFrom:
secretKeyRef:
name: tapis-MAKEFILE_SERVICE_NAME-secrets
key: test-abaco-service-password
- name: POSTGRES_USERNAME
value: pods-admin
- name: POSTGRES_PASSWORD
Expand Down
2 changes: 1 addition & 1 deletion deploymentTemplate/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"service_site_id": "tacc",
"service_name": "pods",
"service_password": "$env{SERVICE_PASSWORD}",
"test_abaco_service_password": "FILLTHISFORTESTING",
"test_abaco_service_password": "$env{TEST_ABACO_SERVICE_PASSWORD}",
"tenants": [
"tacc",
"dev",
Expand Down
1 change: 1 addition & 0 deletions deploymentTemplate/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ stringData:
service-password: MAKEFILE_SERVICE_PASS
rabbitmq-password: adminadmin
postgres-password: adminadmin
test-abaco-service-password: MAKEFILE_TEST_ABACO_SERVICE_PASS

---

Expand Down
2 changes: 2 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def get_service_tapis_client():
sk_url = os.environ.get('sk_url', conf.primary_site_admin_tenant_base_url)
tenant_id = os.environ.get('tenant', 'admin')
test_abaco_service_password = os.environ.get('test_abaco_service_password', conf.test_abaco_service_password)
if test_abaco_service_password == "changeme":
raise KeyError("test_abaco_service_password must be set in config or env for tests to run (it creates tokens)")
jwt = os.environ.get('jwt', None)
resource_set = os.environ.get('resource_set', 'local')
custom_spec_dict = os.environ.get('custom_spec_dict', None)
Expand Down

0 comments on commit 670a237

Please sign in to comment.