mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-04 23:35:11 -04:00
Move cli/cmd into cli/internal
This commit is contained in:
parent
d71e97a940
commit
c3ebd3d3cd
34 changed files with 45 additions and 32 deletions
25
cli/internal/cmd/version_test.go
Normal file
25
cli/internal/cmd/version_test.go
Normal file
|
@ -0,0 +1,25 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"github.com/edgelesssys/constellation/internal/constants"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestVersionCmd(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
cmd := NewVersionCmd()
|
||||
b := &bytes.Buffer{}
|
||||
cmd.SetOut(b)
|
||||
|
||||
err := cmd.Execute()
|
||||
assert.NoError(err)
|
||||
|
||||
s, err := io.ReadAll(b)
|
||||
assert.NoError(err)
|
||||
assert.Contains(string(s), constants.CliVersion)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue