talos
34 строки · 859.0 Байт
1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5//go:build integration
6
7// Package integration_test contains core runners for integration tests
8package integration_test
9
10import (
11"github.com/stretchr/testify/suite"
12
13"github.com/siderolabs/talos/internal/integration/base"
14)
15
16// VersionSuite.
17type VersionSuite struct {
18suite.Suite
19base.TalosSuite
20}
21
22func (suite *VersionSuite) SuiteName() string {
23return "VersionSuite"
24}
25
26func (suite *VersionSuite) TestExpectedVersion() {
27const versionRegex = `v([0-9]+)\.([0-9]+)\.([0-9]+)(-[0-9]+-[a-z]+\.[0-9]+)?(-.g[a-f0-9]+)?(-dirty)?`
28
29suite.Assert().Regexp(versionRegex, suite.Version)
30}
31
32func init() {
33allSuites = append(allSuites, new(VersionSuite))
34}
35