Skip to content

Commit 4ef3084

Browse files
authored
fix: correct function names in domain.go and domain_test.go (#312)
Fixes to correctly reference the difference between dir and file path.
1 parent b2e5ec5 commit 4ef3084

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.changeset/plain-dragons-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"chainlink-deployments-framework": minor
3+
---
4+
5+
[BREAKING] Fixes domain config path getters to have more consistent naming

engine/cld/domain/domain.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ func (d Domain) ConfigLocalDirPath() string {
121121
return filepath.Join(d.ConfigDirPath(), DomainConfigLocalDirName)
122122
}
123123

124-
// ConfigLocalFileName returns the path to a domain environment's local execution config file.
125-
func (d Domain) ConfigLocalFileName(env string) string {
124+
// ConfigLocalFilePath returns the path to a domain environment's local execution config file.
125+
func (d Domain) ConfigLocalFilePath(env string) string {
126126
return filepath.Join(d.ConfigLocalDirPath(), "config."+env+".yaml")
127127
}
128128

129-
// ConfigNetworksFilePath returns the path where the domain's networks config files are stored.
130-
func (d Domain) ConfigNetworksFilePath() string {
129+
// ConfigNetworksDirPath returns the path where the domain's networks config files are stored.
130+
func (d Domain) ConfigNetworksDirPath() string {
131131
return filepath.Join(d.ConfigDirPath(), DomainConfigNetworksDirName)
132132
}
133133

engine/cld/domain/domain_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,13 @@ func Test_Domain_ConfigLocalDirPath(t *testing.T) {
220220
func Test_Domain_ConfigLocalFileName(t *testing.T) {
221221
t.Parallel()
222222
d := NewDomain("domains", "ccip")
223-
assert.Equal(t, "domains/ccip/.config/local/config.staging.yaml", d.ConfigLocalFileName("staging"))
223+
assert.Equal(t, "domains/ccip/.config/local/config.staging.yaml", d.ConfigLocalFilePath("staging"))
224224
}
225225

226226
func Test_Domain_ConfigNetworksFilePath(t *testing.T) {
227227
t.Parallel()
228228
d := NewDomain("domains", "ccip")
229-
assert.Equal(t, "domains/ccip/.config/networks", d.ConfigNetworksFilePath())
229+
assert.Equal(t, "domains/ccip/.config/networks", d.ConfigNetworksDirPath())
230230
}
231231

232232
func Test_Domain_ConfigCIDirPath(t *testing.T) {

0 commit comments

Comments
 (0)