2019-01-28 16:55:28 +03:00
|
|
|
package telemetry_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/hasura/graphql-engine/cli/telemetry"
|
2019-12-25 11:31:29 +03:00
|
|
|
"github.com/hasura/graphql-engine/cli/version"
|
2019-01-28 16:55:28 +03:00
|
|
|
)
|
|
|
|
|
2019-01-29 08:07:22 +03:00
|
|
|
func TestBeamDev(t *testing.T) {
|
2019-01-28 16:55:28 +03:00
|
|
|
tm := telemetry.BuildEvent()
|
2019-12-25 11:31:29 +03:00
|
|
|
tm.Version = version.DevVersion
|
2019-01-29 08:07:22 +03:00
|
|
|
tm.Command = "TEST"
|
|
|
|
tm.CanBeam = true
|
|
|
|
tm.Beam()
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestBeamProd(t *testing.T) {
|
|
|
|
tm := telemetry.BuildEvent()
|
|
|
|
tm.Version = "v1.0.0-a-valid-semver"
|
2019-01-28 16:55:28 +03:00
|
|
|
tm.Command = "TEST"
|
|
|
|
tm.CanBeam = true
|
|
|
|
tm.Beam()
|
|
|
|
}
|