@ -129,7 +129,10 @@ func TestContainerBoot(t *testing.T) {
{
{
// Out of the box default: runs in userspace mode, ephemeral storage, interactive login.
// Out of the box default: runs in userspace mode, ephemeral storage, interactive login.
Name : "no_args" ,
Name : "no_args" ,
Env : nil ,
Env : map [ string ] string {
"TS_AUTH_ONCE" : "false" ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
WantCmds : [ ] string {
WantCmds : [ ] string {
@ -149,7 +152,8 @@ func TestContainerBoot(t *testing.T) {
// Userspace mode, ephemeral storage, authkey provided on every run.
// Userspace mode, ephemeral storage, authkey provided on every run.
Name : "authkey" ,
Name : "authkey" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -170,7 +174,8 @@ func TestContainerBoot(t *testing.T) {
// Userspace mode, ephemeral storage, authkey provided on every run.
// Userspace mode, ephemeral storage, authkey provided on every run.
Name : "authkey-old-flag" ,
Name : "authkey-old-flag" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTH_KEY" : "tskey-key" ,
"TS_AUTH_KEY" : "tskey-key" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -192,6 +197,7 @@ func TestContainerBoot(t *testing.T) {
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_STATE_DIR" : filepath . Join ( d , "tmp" ) ,
"TS_STATE_DIR" : filepath . Join ( d , "tmp" ) ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -211,8 +217,9 @@ func TestContainerBoot(t *testing.T) {
{
{
Name : "routes" ,
Name : "routes" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_ROUTES" : "1.2.3.0/24,10.20.30.0/24" ,
"TS_ROUTES" : "1.2.3.0/24,10.20.30.0/24" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -239,6 +246,7 @@ func TestContainerBoot(t *testing.T) {
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_ROUTES" : "1.2.3.0/24,10.20.30.0/24" ,
"TS_ROUTES" : "1.2.3.0/24,10.20.30.0/24" ,
"TS_USERSPACE" : "false" ,
"TS_USERSPACE" : "false" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -265,6 +273,7 @@ func TestContainerBoot(t *testing.T) {
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_ROUTES" : "::/64,1::/64" ,
"TS_ROUTES" : "::/64,1::/64" ,
"TS_USERSPACE" : "false" ,
"TS_USERSPACE" : "false" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -291,6 +300,7 @@ func TestContainerBoot(t *testing.T) {
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_ROUTES" : "::/64,1.2.3.0/24" ,
"TS_ROUTES" : "::/64,1.2.3.0/24" ,
"TS_USERSPACE" : "false" ,
"TS_USERSPACE" : "false" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -317,6 +327,7 @@ func TestContainerBoot(t *testing.T) {
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_DEST_IP" : "1.2.3.4" ,
"TS_DEST_IP" : "1.2.3.4" ,
"TS_USERSPACE" : "false" ,
"TS_USERSPACE" : "false" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -341,6 +352,7 @@ func TestContainerBoot(t *testing.T) {
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_TAILNET_TARGET_IP" : "100.99.99.99" ,
"TS_TAILNET_TARGET_IP" : "100.99.99.99" ,
"TS_USERSPACE" : "false" ,
"TS_USERSPACE" : "false" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -393,6 +405,7 @@ func TestContainerBoot(t *testing.T) {
Env : map [ string ] string {
Env : map [ string ] string {
"KUBERNETES_SERVICE_HOST" : kube . Host ,
"KUBERNETES_SERVICE_HOST" : kube . Host ,
"KUBERNETES_SERVICE_PORT_HTTPS" : kube . Port ,
"KUBERNETES_SERVICE_PORT_HTTPS" : kube . Port ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
KubeSecret : map [ string ] string {
KubeSecret : map [ string ] string {
"authkey" : "tskey-key" ,
"authkey" : "tskey-key" ,
@ -430,6 +443,7 @@ func TestContainerBoot(t *testing.T) {
"TS_KUBE_SECRET" : "" ,
"TS_KUBE_SECRET" : "" ,
"TS_STATE_DIR" : filepath . Join ( d , "tmp" ) ,
"TS_STATE_DIR" : filepath . Join ( d , "tmp" ) ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
KubeSecret : map [ string ] string { } ,
KubeSecret : map [ string ] string { } ,
Phases : [ ] phase {
Phases : [ ] phase {
@ -455,6 +469,7 @@ func TestContainerBoot(t *testing.T) {
"KUBERNETES_SERVICE_HOST" : kube . Host ,
"KUBERNETES_SERVICE_HOST" : kube . Host ,
"KUBERNETES_SERVICE_PORT_HTTPS" : kube . Port ,
"KUBERNETES_SERVICE_PORT_HTTPS" : kube . Port ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTHKEY" : "tskey-key" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
KubeSecret : map [ string ] string { } ,
KubeSecret : map [ string ] string { } ,
KubeDenyPatch : true ,
KubeDenyPatch : true ,
@ -524,6 +539,7 @@ func TestContainerBoot(t *testing.T) {
Env : map [ string ] string {
Env : map [ string ] string {
"KUBERNETES_SERVICE_HOST" : kube . Host ,
"KUBERNETES_SERVICE_HOST" : kube . Host ,
"KUBERNETES_SERVICE_PORT_HTTPS" : kube . Port ,
"KUBERNETES_SERVICE_PORT_HTTPS" : kube . Port ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
KubeSecret : map [ string ] string {
KubeSecret : map [ string ] string {
"authkey" : "tskey-key" ,
"authkey" : "tskey-key" ,
@ -575,6 +591,7 @@ func TestContainerBoot(t *testing.T) {
Env : map [ string ] string {
Env : map [ string ] string {
"TS_SOCKS5_SERVER" : "localhost:1080" ,
"TS_SOCKS5_SERVER" : "localhost:1080" ,
"TS_OUTBOUND_HTTP_PROXY_LISTEN" : "localhost:8080" ,
"TS_OUTBOUND_HTTP_PROXY_LISTEN" : "localhost:8080" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -595,6 +612,7 @@ func TestContainerBoot(t *testing.T) {
Name : "dns" ,
Name : "dns" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_ACCEPT_DNS" : "true" ,
"TS_ACCEPT_DNS" : "true" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -616,6 +634,7 @@ func TestContainerBoot(t *testing.T) {
Env : map [ string ] string {
Env : map [ string ] string {
"TS_EXTRA_ARGS" : "--widget=rotated" ,
"TS_EXTRA_ARGS" : "--widget=rotated" ,
"TS_TAILSCALED_EXTRA_ARGS" : "--experiments=widgets" ,
"TS_TAILSCALED_EXTRA_ARGS" : "--experiments=widgets" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{
@ -635,7 +654,8 @@ func TestContainerBoot(t *testing.T) {
{
{
Name : "hostname" ,
Name : "hostname" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_HOSTNAME" : "my-server" ,
"TS_HOSTNAME" : "my-server" ,
"TS_AUTH_ONCE" : "false" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
{
{