Skip to content

Commit fd9df0b

Browse files
committed
fix compliance check for source check (compare with lower case)
1 parent 6f0d4ab commit fd9df0b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/compliance/libs/constants/providers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# BTP Provider
55
PROVIDER_BTP = "btp"
66
PROVIDER_BTP_REQUIRED_SOURCE = "sap/btp"
7-
PROVIDER_BTP_REQUIRED_VERSION = "1.4.0"
7+
PROVIDER_BTP_REQUIRED_VERSION = "~> 1.4.0"
88

99
# Cloudfoundry Provider
1010
PROVIDER_CLOUDFOUNDRY = "cloudfoundry"

tests/compliance/libs/inspection/provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def _check_providers(self, provider, tf_definitions):
7575
# ... and if the source is not the required source for the provider
7676
source = tf_definitions["required_providers"][provider]["source"]
7777
# check if the source is not the required source
78-
if (provider == "btp" and source not in PROVIDER_BTP_REQUIRED_SOURCE) or (provider == "cloudfoundry" and source not in PROVIDER_CLOUDFOUNDRY_REQUIRED_SOURCE):
78+
if (provider == "btp" and source.lower() not in PROVIDER_BTP_REQUIRED_SOURCE.lower()) or (provider == "cloudfoundry" and source.lower() not in PROVIDER_CLOUDFOUNDRY_REQUIRED_SOURCE.lower()):
7979
# ... then create a finding that the source is not the required source
8080
finding = Finding(provider=provider,
8181
folder=self.folder,

0 commit comments

Comments
 (0)