Unable to provide values for configurables in Ballerina

21 views Asked by At

I am encountering an issue while trying to provide values for configurable defined in the email_sender module of the github_stats_per_person package. The configurable include ClientId, ClientSecret, and RefreshToken.

I have added values for configurable in the following format, in Config.toml:

[github_stats_per_person.email_sender]
ClientId = ""
ClientSecret = ""
RefreshToken = ""

I am encountering the following errors:

github_stats_per_person.email_sender
error: value not provided for required configurable variable 'ClientId'
        at wso2/github_stats_per_person.email_sender:0.1.0(configurables.bal:1)
error: value not provided for required configurable variable 'ClientSecret'
        at wso2/github_stats_per_person.email_sender:0.1.0(configurables.bal:2)
error: value not provided for required configurable variable 'RefreshToken'
        at wso2/github_stats_per_person.email_sender:0.1.0(configurables.bal:3)

I appreciate any guidance to resolve this issue

1

There are 1 answers

0
Chiran Sachintha On

The issue arose from attempting to execute the bal test command without including values in the Config.toml file located inside the tests' folder. Initially, the configuration only included values in the Config.toml file at the root directory.

To resolve this, a dedicated Config.toml file was added inside the tests folder with the necessary values for configurable, such as ClientId, ClientSecret, and RefreshToken.