Clarify source version evidence names
This commit is contained in:
@@ -40,7 +40,7 @@ func TestSourceInfoDestinationConversion(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSourceVersionCheckConversion(t *testing.T) {
|
||||
func TestSourceVersionEvidenceConversion(t *testing.T) {
|
||||
path := Keys("version")
|
||||
file := writeRecordConfig(t, "version: '123'\nvalue: main\n")
|
||||
options := engine.Options[recordConfig]{
|
||||
@@ -59,10 +59,10 @@ func TestSourceVersionCheckConversion(t *testing.T) {
|
||||
}
|
||||
internal := engineSourceInfoFromLoad(t, file, "source-1", options)
|
||||
converted := fromEngineSourceInfo(internal)
|
||||
if converted.VersionCheck == nil || converted.VersionCheck.Path.String() != path.String() ||
|
||||
!converted.VersionCheck.Version.Present || converted.VersionCheck.Version.Text != "123" ||
|
||||
converted.VersionCheck.Location == nil || converted.VersionCheck.Location.SourceID != internal.ID || converted.VersionCheck.Location.Line != 1 {
|
||||
t.Fatalf("public source version check = %#v", converted.VersionCheck)
|
||||
if converted.VersionEvidence == nil || converted.VersionEvidence.Path.String() != path.String() ||
|
||||
!converted.VersionEvidence.Version.Present || converted.VersionEvidence.Version.Text != "123" ||
|
||||
converted.VersionEvidence.Location == nil || converted.VersionEvidence.Location.SourceID != internal.ID || converted.VersionEvidence.Location.Line != 1 {
|
||||
t.Fatalf("public source version check = %#v", converted.VersionEvidence)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user