Skip to content

Commit

Permalink
fix(server): incrementing test version without any change (#3566)
Browse files Browse the repository at this point in the history
  • Loading branch information
schoren committed Jan 25, 2024
1 parent bf06ecc commit 0363b09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions server/test/test_entities.go
Expand Up @@ -164,6 +164,14 @@ type (
}
)

func (t Test) GetSpecs() Specs {
if t.Specs == nil {
return Specs{}
}

return t.Specs
}

func (t Test) GetID() id.ID {
return t.ID
}
Expand Down
3 changes: 1 addition & 2 deletions server/test/test_repository.go
Expand Up @@ -313,7 +313,6 @@ func (r *repository) readRow(ctx context.Context, row scanner) (Test, error) {
if fail != nil {
test.Summary.LastRun.Fails = *fail
}

return test, nil
}

Expand Down Expand Up @@ -455,7 +454,7 @@ func testHasChanged(oldTest Test, newTest Test) (bool, error) {
return false, err
}

definitionHasChanged, err := testFieldHasChanged(oldTest.Specs, newTest.Specs)
definitionHasChanged, err := testFieldHasChanged(oldTest.GetSpecs(), newTest.GetSpecs())
if err != nil {
return false, err
}
Expand Down

0 comments on commit 0363b09

Please sign in to comment.