Skip to content

Commit

Permalink
Merge pull request #281 from vshn/fix-billing-addon
Browse files Browse the repository at this point in the history
Add add-on billing label
  • Loading branch information
zugao authored Dec 6, 2024
2 parents 44af440 + f6f1ad5 commit bf5e1e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/comp-functions/functions/common/billing.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func getLabels(svc *runtime.ServiceRuntime, comp InfoGetter, org, addOnName stri
"label_appcat_vshn_io_claim_name": comp.GetClaimName(),
"label_appcat_vshn_io_claim_namespace": comp.GetClaimNamespace(),
"label_appcat_vshn_io_sla": comp.GetSLA(),
"label_appcat_vshn_io_addon_name": addOnName,
"label_appuio_io_billing_name": b,
"label_appuio_io_organization": org,
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/comp-functions/functions/common/billing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func TestBilling(t *testing.T) {
"label_appcat_vshn_io_claim_name": "test-instance",
"label_appcat_vshn_io_claim_namespace": "test-namespace",
"label_appcat_vshn_io_sla": "besteffort",
"label_appcat_vshn_io_addon_name": "",
"label_appuio_io_billing_name": "appcat-nextcloud",
"label_appuio_io_organization": "vshn",
},
Expand All @@ -78,6 +79,7 @@ func TestBilling(t *testing.T) {
"label_appcat_vshn_io_claim_name": "test-instance",
"label_appcat_vshn_io_claim_namespace": "test-namespace",
"label_appcat_vshn_io_sla": "besteffort",
"label_appcat_vshn_io_addon_name": "office",
"label_appuio_io_billing_name": "appcat-nextcloud-office",
"label_appuio_io_organization": "vshn",
},
Expand Down Expand Up @@ -119,6 +121,7 @@ func TestBilling(t *testing.T) {
"label_appcat_vshn_io_claim_name": "test-instance",
"label_appcat_vshn_io_claim_namespace": "test-namespace",
"label_appcat_vshn_io_sla": "besteffort",
"label_appcat_vshn_io_addon_name": "",
"label_appuio_io_billing_name": "appcat-nextcloud",
"label_appuio_io_organization": "vshn",
},
Expand Down Expand Up @@ -177,6 +180,7 @@ func TestGetLabels(t *testing.T) {
"label_appcat_vshn_io_claim_name": "test-instance",
"label_appcat_vshn_io_claim_namespace": "test-namespace",
"label_appcat_vshn_io_sla": "besteffort",
"label_appcat_vshn_io_addon_name": "office",
"label_appuio_io_billing_name": "appcat-nextcloud-office",
"label_appuio_io_organization": "APPUiO",
"sales_order": "12132ST",
Expand Down Expand Up @@ -204,6 +208,7 @@ func TestGetLabels(t *testing.T) {
"label_appcat_vshn_io_claim_name": "test-instance",
"label_appcat_vshn_io_claim_namespace": "test-namespace",
"label_appcat_vshn_io_sla": "besteffort",
"label_appcat_vshn_io_addon_name": "office",
"label_appuio_io_billing_name": "appcat-nextcloud-office",
"label_appuio_io_organization": "APPUiO",
},
Expand Down

0 comments on commit bf5e1e7

Please sign in to comment.