03b1cf763d
* Batch-move everything
* go mod tidy
* make drone
* Remove genversions
* Bump alpine image
* Revert back pkg/build/docker/build.go
* Make sure correct enterprise branch is checked out
* Add enterprise2 version
* Remove extensions
* Bump build container
* backport node 18 test fix
(cherry picked from commit 4ff03fdbfb)
* Update scripts/drone
* Add more commands
* Fix starlark link
* Copy .drone.star
* Add drone target branch for custom events
---------
23 lines
630 B
Go
23 lines
630 B
Go
package packaging_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/grafana/grafana/pkg/build/config"
|
|
"github.com/grafana/grafana/pkg/build/packaging"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestPackageRegexp(t *testing.T) {
|
|
t.Run("It should match enterprise2 packages", func(t *testing.T) {
|
|
rgx := packaging.PackageRegexp(config.EditionEnterprise2)
|
|
matches := []string{
|
|
"grafana-enterprise2-1.2.3-4567pre.linux-amd64.tar.gz",
|
|
"grafana-enterprise2-1.2.3-4567pre.linux-amd64.tar.gz.sha256",
|
|
}
|
|
for _, v := range matches {
|
|
assert.Truef(t, rgx.MatchString(v), "'%s' should match regex '%s'", v, rgx.String())
|
|
}
|
|
})
|
|
}
|