tailscale/tstest/integration/vms/top_level_test.go
Christine Dodrill 798b0da470
tstest/integration/vms: codegen for top level tests (#2441)
This moves the distribution definitions into a maintainable hujson file
instead of just existing as constants in `distros.go`. Comments are
maintained from the inline definitions.

This uses jennifer[1] for hygenic source tree creation. This allows us
to generate a unique top-level test for each VM run. This should
hopefully help make the output of `go test` easier to read.

This also separates each test out into its own top-level test so that we
can better track the time that each distro takes. I really wish there
was a way to have the `test_codegen.go` file _always_ run as a part of
the compile process instead of having to rely on people remembering to
run `go generate`, but I am limited by my tools.

This will let us remove the `-distro-regex` flag and use `go test -run`
to pick which distros are run.

Signed-off-by: Christine Dodrill <xe@tailscale.com>
2021-07-16 15:25:16 -04:00

122 lines
2.7 KiB
Go

// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build linux
package vms
import "testing"
// Code generated by tstest/integration/vms/gen/test_codegen.go DO NOT EDIT.
func TestRunAlpine3135(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 0, Distros[0])
}
func TestRunAlpineEdge(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 1, Distros[1])
}
func TestRunAmazonLinux(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 2, Distros[2])
}
func TestRunArch(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 3, Distros[3])
}
func TestRunCentos7(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 4, Distros[4])
}
func TestRunCentos8(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 5, Distros[5])
}
func TestRunDebian9(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 6, Distros[6])
}
func TestRunDebian10(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 7, Distros[7])
}
func TestRunFedora34(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 8, Distros[8])
}
func TestRunOpensuseLeap151(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 9, Distros[9])
}
func TestRunOpensuseLeap152(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 10, Distros[10])
}
func TestRunOpensuseLeap153(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 11, Distros[11])
}
func TestRunOpensuseTumbleweed(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 12, Distros[12])
}
func TestRunOracleLinux7(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 13, Distros[13])
}
func TestRunOracleLinux8(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 14, Distros[14])
}
func TestRunUbuntu1604(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 15, Distros[15])
}
func TestRunUbuntu1804(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 16, Distros[16])
}
func TestRunUbuntu2004(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 17, Distros[17])
}
func TestRunUbuntu2010(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 18, Distros[18])
}
func TestRunUbuntu2104(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 19, Distros[19])
}
func TestRunNixos2105(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 20, Distros[20])
}
func TestRunNixosUnstable(t *testing.T) {
t.Parallel()
setupTests(t)
testOneDistribution(t, 21, Distros[21])
}