Skip to content

Commit 3ef7098

Browse files
committed
[TF-7737] Ensure TestsEnabled is present before validating
1 parent cd7ff6c commit 3ef7098

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

registry_module.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -727,9 +727,11 @@ func (o RegistryModuleCreateWithVCSConnectionOptions) valid() error {
727727
}
728728

729729
if o.TestConfig != nil {
730-
if *o.TestConfig.TestsEnabled {
731-
if !validString(o.VCSRepo.Branch) {
732-
return ErrRequiredBranchWhenTestsEnabled
730+
if o.TestConfig.TestsEnabled != nil {
731+
if *o.TestConfig.TestsEnabled {
732+
if !validString(o.VCSRepo.Branch) {
733+
return ErrRequiredBranchWhenTestsEnabled
734+
}
733735
}
734736
}
735737
}

0 commit comments

Comments
 (0)