Skip to content

Commit

Permalink
feat: increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
joanestebanr committed Dec 18, 2024
1 parent 3c7ec15 commit 2bae855
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
16 changes: 16 additions & 0 deletions aggsender/types/status_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package types

import (
"errors"
"testing"

"github.com/stretchr/testify/require"
)

func TestAggsenderStatusSetLastError(t *testing.T) {
sut := AggsenderStatus{}
sut.SetLastError(nil)
require.Equal(t, "", sut.LastError)
sut.SetLastError(errors.New("error"))
require.Equal(t, "error", sut.LastError)
}
18 changes: 18 additions & 0 deletions version_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package cdk

import (
"testing"

"github.com/stretchr/testify/require"
)

func TestGetVersion(t *testing.T) {
data := GetVersion()
require.True(t, len(data.Version) > 0)
require.True(t, len(data.GitRev) > 0)
require.True(t, len(data.GitBranch) > 0)
require.True(t, len(data.BuildDate) > 0)
require.True(t, len(data.GoVersion) > 0)
require.True(t, len(data.OS) > 0)
require.True(t, len(data.Arch) > 0)
}

0 comments on commit 2bae855

Please sign in to comment.