@ -146,6 +146,24 @@ 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 {
"TS_AUTHKEY" : "tskey-key" ,
} ,
Phases : [ ] phase {
{
WantCmds : [ ] string {
"/usr/bin/tailscaled --socket=/tmp/tailscaled.sock --state=mem: --statedir=/tmp --tun=userspace-networking" ,
"/usr/bin/tailscale --socket=/tmp/tailscaled.sock up --accept-dns=false --authkey=tskey-key" ,
} ,
} ,
{
Notify : runningNotify ,
} ,
} ,
} ,
{
// Userspace mode, ephemeral storage, authkey provided on every run.
Name : "authkey-old-flag" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTH_KEY" : "tskey-key" ,
"TS_AUTH_KEY" : "tskey-key" ,
} ,
} ,
@ -164,7 +182,7 @@ func TestContainerBoot(t *testing.T) {
{
{
Name : "authkey_disk_state" ,
Name : "authkey_disk_state" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTH _ KEY": "tskey-key" ,
"TS_AUTH KEY": "tskey-key" ,
"TS_STATE_DIR" : filepath . Join ( d , "tmp" ) ,
"TS_STATE_DIR" : filepath . Join ( d , "tmp" ) ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
@ -182,7 +200,7 @@ func TestContainerBoot(t *testing.T) {
{
{
Name : "routes" ,
Name : "routes" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTH _ KEY": "tskey-key" ,
"TS_AUTH KEY": "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" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
@ -204,7 +222,7 @@ func TestContainerBoot(t *testing.T) {
{
{
Name : "routes_kernel_ipv4" ,
Name : "routes_kernel_ipv4" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTH _ KEY": "tskey-key" ,
"TS_AUTH KEY": "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" ,
} ,
} ,
@ -227,7 +245,7 @@ func TestContainerBoot(t *testing.T) {
{
{
Name : "routes_kernel_ipv6" ,
Name : "routes_kernel_ipv6" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTH _ KEY": "tskey-key" ,
"TS_AUTH KEY": "tskey-key" ,
"TS_ROUTES" : "::/64,1::/64" ,
"TS_ROUTES" : "::/64,1::/64" ,
"TS_USERSPACE" : "false" ,
"TS_USERSPACE" : "false" ,
} ,
} ,
@ -250,7 +268,7 @@ func TestContainerBoot(t *testing.T) {
{
{
Name : "routes_kernel_all_families" ,
Name : "routes_kernel_all_families" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTH _ KEY": "tskey-key" ,
"TS_AUTH KEY": "tskey-key" ,
"TS_ROUTES" : "::/64,1.2.3.0/24" ,
"TS_ROUTES" : "::/64,1.2.3.0/24" ,
"TS_USERSPACE" : "false" ,
"TS_USERSPACE" : "false" ,
} ,
} ,
@ -273,7 +291,7 @@ func TestContainerBoot(t *testing.T) {
{
{
Name : "proxy" ,
Name : "proxy" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTH _ KEY": "tskey-key" ,
"TS_AUTH KEY": "tskey-key" ,
"TS_DEST_IP" : "1.2.3.4" ,
"TS_DEST_IP" : "1.2.3.4" ,
"TS_USERSPACE" : "false" ,
"TS_USERSPACE" : "false" ,
} ,
} ,
@ -295,7 +313,7 @@ func TestContainerBoot(t *testing.T) {
{
{
Name : "authkey_once" ,
Name : "authkey_once" ,
Env : map [ string ] string {
Env : map [ string ] string {
"TS_AUTH _ KEY": "tskey-key" ,
"TS_AUTH KEY": "tskey-key" ,
"TS_AUTH_ONCE" : "true" ,
"TS_AUTH_ONCE" : "true" ,
} ,
} ,
Phases : [ ] phase {
Phases : [ ] phase {
@ -354,7 +372,7 @@ func TestContainerBoot(t *testing.T) {
// Explicitly set to an empty value, to override the default of "tailscale".
// Explicitly set to an empty value, to override the default of "tailscale".
"TS_KUBE_SECRET" : "" ,
"TS_KUBE_SECRET" : "" ,
"TS_STATE_DIR" : filepath . Join ( d , "tmp" ) ,
"TS_STATE_DIR" : filepath . Join ( d , "tmp" ) ,
"TS_AUTH _ KEY": "tskey-key" ,
"TS_AUTH KEY": "tskey-key" ,
} ,
} ,
KubeSecret : map [ string ] string { } ,
KubeSecret : map [ string ] string { } ,
Phases : [ ] phase {
Phases : [ ] phase {
@ -376,7 +394,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 _ KEY": "tskey-key" ,
"TS_AUTH KEY": "tskey-key" ,
} ,
} ,
KubeSecret : map [ string ] string { } ,
KubeSecret : map [ string ] string { } ,
KubeDenyPatch : true ,
KubeDenyPatch : true ,