mirror of
https://github.com/lxc/distrobuilder.git
synced 2026-02-05 06:45:19 +01:00
19 lines
394 B
Go
19 lines
394 B
Go
package sources
|
|
|
|
import (
|
|
"net/http"
|
|
"regexp"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestArchLinuxGetLatestRelease(t *testing.T) {
|
|
src := &archlinux{}
|
|
src.client = http.DefaultClient
|
|
|
|
release, err := src.getLatestRelease("https://archive.archlinux.org/iso/", "x86_64")
|
|
require.NoError(t, err)
|
|
require.Regexp(t, regexp.MustCompile(`^\d{4}\.\d{2}\.\d{2}$`), release)
|
|
}
|